Kiibohd Controller
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

usb_hid.h 30KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774
  1. /* Copyright (C) 2011-2015 by Jacob Alexander
  2. *
  3. * Permission is hereby granted, free of charge, to any person obtaining a copy
  4. * of this software and associated documentation files (the "Software"), to deal
  5. * in the Software without restriction, including without limitation the rights
  6. * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  7. * copies of the Software, and to permit persons to whom the Software is
  8. * furnished to do so, subject to the following conditions:
  9. *
  10. * The above copyright notice and this permission notice shall be included in
  11. * all copies or substantial portions of the Software.
  12. *
  13. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  14. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  15. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  16. * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  17. * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  18. * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  19. * THE SOFTWARE.
  20. */
  21. #pragma once
  22. // ----- Defines -----
  23. // The USB codes are all taken from the USB HID Spec
  24. // http://www.usb.org/developers/hidpage/Hut1_12v2.pdf (HID Usage Tables)
  25. // List of Keycodes - USB HID 1.12v2 pg 53
  26. #define KEY_NOEVENT 0x00 // Event, not a physical key
  27. #define KEY_ERRORROLLOVER 0x01 // Event, not a physical key
  28. #define KEY_POSTFAIL 0x02 // Event, not a physical key
  29. #define KEY_ERRORUNDEFINED 0x03 // Event, not a physical key
  30. #define KEY_A 0x04
  31. #define KEY_B 0x05
  32. #define KEY_C 0x06
  33. #define KEY_D 0x07
  34. #define KEY_E 0x08
  35. #define KEY_F 0x09
  36. #define KEY_G 0x0A
  37. #define KEY_H 0x0B
  38. #define KEY_I 0x0C
  39. #define KEY_J 0x0D
  40. #define KEY_K 0x0E
  41. #define KEY_L 0x0F
  42. #define KEY_M 0x10
  43. #define KEY_N 0x11
  44. #define KEY_O 0x12
  45. #define KEY_P 0x13
  46. #define KEY_Q 0x14
  47. #define KEY_R 0x15
  48. #define KEY_S 0x16
  49. #define KEY_T 0x17
  50. #define KEY_U 0x18
  51. #define KEY_V 0x19
  52. #define KEY_W 0x1A
  53. #define KEY_X 0x1B
  54. #define KEY_Y 0x1C
  55. #define KEY_Z 0x1D
  56. #define KEY_1 0x1E
  57. #define KEY_2 0x1F
  58. #define KEY_3 0x20
  59. #define KEY_4 0x21
  60. #define KEY_5 0x22
  61. #define KEY_6 0x23
  62. #define KEY_7 0x24
  63. #define KEY_8 0x25
  64. #define KEY_9 0x26
  65. #define KEY_0 0x27
  66. #define KEY_ENTER 0x28
  67. #define KEY_ESC 0x29
  68. #define KEY_BACKSPACE 0x2A
  69. #define KEY_TAB 0x2B
  70. #define KEY_SPACE 0x2C
  71. #define KEY_MINUS 0x2D
  72. #define KEY_EQUAL 0x2E
  73. #define KEY_LEFT_BRACE 0x2F
  74. #define KEY_RIGHT_BRACE 0x30
  75. #define KEY_BACKSLASH 0x31
  76. #define KEY_NUMBER 0x32
  77. #define KEY_SEMICOLON 0x33
  78. #define KEY_QUOTE 0x34
  79. #define KEY_BACKTICK 0x35
  80. #define KEY_COMMA 0x36
  81. #define KEY_PERIOD 0x37
  82. #define KEY_SLASH 0x38
  83. #define KEY_CAPS_LOCK 0x39
  84. #define KEY_F1 0x3A
  85. #define KEY_F2 0x3B
  86. #define KEY_F3 0x3C
  87. #define KEY_F4 0x3D
  88. #define KEY_F5 0x3E
  89. #define KEY_F6 0x3F
  90. #define KEY_F7 0x40
  91. #define KEY_F8 0x41
  92. #define KEY_F9 0x42
  93. #define KEY_F10 0x43
  94. #define KEY_F11 0x44
  95. #define KEY_F12 0x45
  96. #define KEY_PRINTSCREEN 0x46
  97. #define KEY_SCROLL_LOCK 0x47
  98. #define KEY_PAUSE 0x48
  99. #define KEY_INSERT 0x49
  100. #define KEY_HOME 0x4A
  101. #define KEY_PAGE_UP 0x4B
  102. #define KEY_DELETE 0x4C
  103. #define KEY_END 0x4D
  104. #define KEY_PAGE_DOWN 0x4E
  105. #define KEY_RIGHT 0x4F
  106. #define KEY_LEFT 0x50
  107. #define KEY_DOWN 0x51
  108. #define KEY_UP 0x52
  109. #define KEY_NUM_LOCK 0x53
  110. #define KEYPAD_SLASH 0x54
  111. #define KEYPAD_ASTERISK 0x55
  112. #define KEYPAD_MINUS 0x56
  113. #define KEYPAD_PLUS 0x57
  114. #define KEYPAD_ENTER 0x58
  115. #define KEYPAD_1 0x59
  116. #define KEYPAD_2 0x5A
  117. #define KEYPAD_3 0x5B
  118. #define KEYPAD_4 0x5C
  119. #define KEYPAD_5 0x5D
  120. #define KEYPAD_6 0x5E
  121. #define KEYPAD_7 0x5F
  122. #define KEYPAD_8 0x60
  123. #define KEYPAD_9 0x61
  124. #define KEYPAD_0 0x62
  125. #define KEYPAD_PERIOD 0x63
  126. #define KEY_ISO_SLASH 0x64
  127. #define KEY_APP 0x65
  128. #define KEYBOARD_STATUS 0x66 // Used for indicating keyboard is on/status/errors, not a key
  129. #define KEYPAD_EQUAL 0x67
  130. #define KEY_F13 0x68
  131. #define KEY_F14 0x69
  132. #define KEY_F15 0x6A
  133. #define KEY_F16 0x6B
  134. #define KEY_F17 0x6C
  135. #define KEY_F18 0x6D
  136. #define KEY_F19 0x6E
  137. #define KEY_F20 0x6F
  138. #define KEY_F21 0x70
  139. #define KEY_F22 0x71
  140. #define KEY_F23 0x72
  141. #define KEY_F24 0x73
  142. #define KEY_EXEC 0x74
  143. #define KEY_HELP 0x75
  144. #define KEY_MENU 0x76
  145. #define KEY_SELECT 0x77
  146. #define KEY_STOP 0x78
  147. #define KEY_AGAIN 0x79
  148. #define KEY_UNDO 0x7A
  149. #define KEY_CUT 0x7B
  150. #define KEY_COPY 0x7C
  151. #define KEY_PASTE 0x7D
  152. #define KEY_FIND 0x7E
  153. #define KEY_MUTE 0x7F
  154. #define KEY_VOL_UP 0x80
  155. #define KEY_VOL_DOWN 0x81
  156. #define KEY_CAPS_TLOCK 0x82 // Toggle "Locking" Scroll Lock (Old keyboards with Locking Caps Lock)
  157. #define KEY_NUM_TLOCK 0x83
  158. #define KEY_SCROLL_TLOCK 0x84
  159. #define KEYPAD_COMMA 0x85 // Brazillian (See spec)
  160. #define KEYPAD_EQUAL_AS 0x86 // AS/400 Keyboard (See spec)
  161. #define KEY_INTER1 0x87 // KANJI1 - Brazillian and Japanese "Ru" and "-"
  162. #define KEY_INTER2 0x88 // KANJI2 - Japanese Katakana/Hiragana
  163. #define KEY_INTER3 0x89 // KANJI3 - Japanese Yen
  164. #define KEY_INTER4 0x8A // KANJI4 - Japanese Henkan
  165. #define KEY_INTER5 0x8B // KANJI5 - Japanese Muhenkan
  166. #define KEY_INTER6 0x8C // KANJI6 - PC0x62 Comma (Ka-m-ma)
  167. #define KEY_INTER7 0x8D // KANJI7 - Double-Byte/Single-Byte Toggle
  168. #define KEY_INTER8 0x8E // KANJI8 - Undefined
  169. #define KEY_INTER9 0x8F // KANJI9 - Undefined
  170. #define KEY_LANG1 0x90 // Korean Hangul/English Toggle
  171. #define KEY_LANG2 0x91 // Korean Hanja Conversion - Japanese Eisu
  172. #define KEY_LANG3 0x92 // Japanese Katakana Key (USB)
  173. #define KEY_LANG4 0x93 // Japanese Hiragana Key (USB)
  174. #define KEY_LANG5 0x94 // Japanese Zenkaku/Hankaku Key (USB)
  175. #define KEY_LANG6 0x95 // Reserved (Application Specific)
  176. #define KEY_LANG7 0x96 // Reserved (Application Specific)
  177. #define KEY_LANG8 0x97 // Reserved (Application Specific)
  178. #define KEY_LANG9 0x98 // Reserved (Application Specific)
  179. #define KEY_ALT_ERASE 0x99 // Special Erase (See Spec)
  180. #define KEY_SYSREQ_ATT 0x9A // Modifier Type
  181. #define KEY_CANCEL 0x9B
  182. #define KEY_CLEAR 0x9C
  183. #define KEY_PRIOR 0x9D
  184. #define KEY_RETURN 0x9E
  185. #define KEY_SEPARATOR 0x9F
  186. #define KEY_OUT 0xA0
  187. #define KEY_OPER 0xA1
  188. #define KEY_CLEAR_AGAIN 0xA2
  189. #define KEY_CRSEL_PROPS 0xA3
  190. #define KEY_EXSEL 0xA4
  191. // 0xA5 - 0xAF Reserved
  192. #define KEYPAD_00 0xB0
  193. #define KEYPAD_000 0xB1
  194. #define KEY_1000_SEP 0xB2
  195. #define KEY_DECIMAL_SEP 0xB3
  196. #define KEY_CURRENCY_MAIN 0xB4
  197. #define KEY_CURRENCY_SUB 0xB5
  198. #define KEYPAD_LPAREN 0xB6
  199. #define KEYPAD_RPAREN 0xB7
  200. #define KEYPAD_LBRACE 0xB8
  201. #define KEYPAD_RBRACE 0xB9
  202. #define KEYPAD_TAB 0xBA
  203. #define KEYPAD_BACKSPACE 0xBB
  204. #define KEYPAD_A 0xBC
  205. #define KEYPAD_B 0xBD
  206. #define KEYPAD_C 0xBE
  207. #define KEYPAD_D 0xBF
  208. #define KEYPAD_E 0xC0
  209. #define KEYPAD_F 0xC1
  210. #define KEYPAD_XOR 0xC2
  211. #define KEYPAD_CHEVRON 0xC3
  212. #define KEYPAD_PERCENT 0xC4
  213. #define KEYPAD_LTHAN 0xC5
  214. #define KEYPAD_GTHAN 0xC6
  215. #define KEYPAD_BITAND 0xC7
  216. #define KEYPAD_AND 0xC8
  217. #define KEYPAD_BITOR 0xC9
  218. #define KEYPAD_OR 0xCA
  219. #define KEYPAD_COLON 0xCB
  220. #define KEYPAD_POUND 0xCC
  221. #define KEYPAD_SPACE 0xCD
  222. #define KEYPAD_AT 0xCE
  223. #define KEYPAD_EXCLAIM 0xCF
  224. #define KEYPAD_MEM_STORE 0xD0
  225. #define KEYPAD_MEM_RECALL 0xD1
  226. #define KEYPAD_MEM_CLEAR 0xD2
  227. #define KEYPAD_MEM_ADD 0xD3
  228. #define KEYPAD_MEM_SUB 0xD4
  229. #define KEYPAD_MEM_MULT 0xD5
  230. #define KEYPAD_MEM_DIV 0xD6
  231. #define KEYPAD_PLUS_MINUS 0xD7
  232. #define KEYPAD_CLEAR 0xD8
  233. #define KEYPAD_CLEAR_ENTRY 0xD9
  234. #define KEYPAD_BINARY 0xDA
  235. #define KEYPAD_OCTAL 0xDB
  236. #define KEYPAD_DECIMAL 0xDC
  237. #define KEYPAD_HEX 0xDD
  238. // 0xDE - 0xDF Reserved
  239. #define KEY_CTRL 0xE0 // Convenience
  240. #define KEY_LCTRL 0xE0
  241. #define KEY_SHIFT 0xE1 // Convenience
  242. #define KEY_LSHIFT 0xE1
  243. #define KEY_ALT 0xE2 // Convenience
  244. #define KEY_LALT 0xE2
  245. #define KEY_GUI 0xE3 // Convenience
  246. #define KEY_LGUI 0xE3
  247. #define KEY_RCTRL 0xE4
  248. #define KEY_RSHIFT 0xE5
  249. #define KEY_RALT 0xE6
  250. #define KEY_RGUI 0xE7
  251. // 0xE8 - 0xFFFF Reserved
  252. // Except for 0xE0-0xE7 which are DV (Dynamic Flags), all Keycodes are Sel (Selectors).
  253. // List of LED codes - USB HID 1.12v2 pg 61
  254. // LED/Indicators are defined as:
  255. // OOC - On/Off Control
  256. // US - Usage Indicator: 1 - In Use, 0 - Not In Use
  257. // UM - Usage Multi Mode Indicator Collection of 1 or more indicators: On, Flash, Slow Blink, Fast Blink, Off
  258. // Sel - Selector
  259. // DV - Dynamic Flag
  260. #define LED_UNDEFINED 0x00
  261. #define LED_NUM_LOCK 0x01 // OOC
  262. #define LED_CAPS_LOCK 0x02 // OOC
  263. #define LED_SCROLL_LOCK 0x03 // OOC
  264. #define LED_COMPOSE 0x04 // OOC
  265. #define LED_KANA 0x05 // OOC
  266. #define LED_POWER 0x06 // OOC
  267. #define LED_SHIFT 0x07 // OOC
  268. #define LED_DO_NOT_DISTURB 0x08 // OOC
  269. #define LED_MUTE 0x09 // OOC
  270. #define LED_TONE_ENABLE 0x0A // OOC
  271. #define LED_HIGHCUT_FILTER 0x0B // OOC
  272. #define LED_LOWCUT_FILTER 0x0C // OOC
  273. #define LED_EQL_ENABLE 0x0D // OOC
  274. #define LED_SND_FLD_ON 0x0E // OOC
  275. #define LED_SURROUND_ON 0x0F // OOC
  276. #define LED_REPEAT 0x10 // OOC
  277. #define LED_STEREO 0x11 // OOC
  278. #define LED_SAMPLE_RT_DET 0x12 // OOC
  279. #define LED_SPINNING 0x13 // OOC
  280. #define LED_CAV 0x14 // OOC
  281. #define LED_CLV 0x15 // OOC
  282. #define LED_REC_FMT_DET 0x16 // OOC
  283. #define LED_OFF_HOOK 0x17 // OOC
  284. #define LED_RING 0x18 // OOC
  285. #define LED_MSG_WAITING 0x19 // OOC
  286. #define LED_DATA_MODE 0x1A // OOC
  287. #define LED_BAT_OPERATION 0x1B // OOC
  288. #define LED_BAT_OK 0x1C // OOC
  289. #define LED_BAT_LOW 0x1D // OOC
  290. #define LED_SPEAKER 0x1E // OOC
  291. #define LED_HEAD_SET 0x1F // OOC
  292. #define LED_HOLD 0x20 // OOC
  293. #define LED_MICROPHONE 0x21 // OOC
  294. #define LED_COVERAGE 0x22 // OOC
  295. #define LED_NIGHT_MODE 0x23 // OOC
  296. #define LED_SEND_CALLS 0x24 // OOC
  297. #define LED_CALL_PICKUP 0x25 // OOC
  298. #define LED_CONFERENCE 0x26 // OOC
  299. #define LED_STAND_BY 0x27 // OOC
  300. #define LED_CAMERA_ON 0x28 // OOC
  301. #define LED_CAMERA_OFF 0x29 // OOC
  302. #define LED_ON_LINE 0x2A // OOC
  303. #define LED_OFF_LINE 0x2B // OOC
  304. #define LED_BUSY 0x2C // OOC
  305. #define LED_READY 0x2D // OOC
  306. #define LED_PAPER_OUT 0x2E // OOC
  307. #define LED_PAPER_JAM 0x2F // OOC
  308. #define LED_REMOTE 0x30 // OOC
  309. #define LED_FORWARD 0x31 // OOC
  310. #define LED_REVERSE 0x32 // OOC
  311. #define LED_STOP 0x33 // OOC
  312. #define LED_REWIND 0x34 // OOC
  313. #define LED_FAST_FORWARD 0x35 // OOC
  314. #define LED_PLAY 0x36 // OOC
  315. #define LED_PAUSE 0x37 // OOC
  316. #define LED_RECORD 0x38 // OOC
  317. #define LED_ERROR 0x39 // OOC
  318. #define LED_USI 0x3A // US
  319. #define LED_UIUI 0x3B // US
  320. #define LED_UMMI 0x3C // UM
  321. #define LED_IND_ON 0x3D // Sel
  322. #define LED_IND_FLASH 0x3E // Sel
  323. #define LED_IND_SLOW_BLNK 0x3F // Sel
  324. #define LED_IND_FAST_BLNK 0x40 // Sel
  325. #define LED_IND_OFF 0x41 // Sel
  326. #define LED_FLASH_ON_TIME 0x42 // DV
  327. #define LED_SLW_B_ON_TIME 0x43 // DV
  328. #define LED_SLW_B_OFF_TIME 0x44 // DV
  329. #define LED_FST_B_ON_TIME 0x45 // DV
  330. #define LED_FST_B_OFF_TIME 0x46 // DV
  331. #define LED_UIC 0x47 // UM
  332. #define LED_IND_RED 0x48 // Sel
  333. #define LED_IND_GREEN 0x49 // Sel
  334. #define LED_IND_AMBER 0x4A // Sel
  335. #define LED_GENERIC_IND 0x4B // OOC
  336. #define LED_SYS_SUSPEND 0x4C // OOC
  337. #define LED_EXT_PWR_CONN 0x4D // OOC
  338. // 0x4E - 0xFFFF Reserved
  339. // List of Mouse Buttons - USB HID 1.12v2 pg 67
  340. #define MOUSE_NOPRESS 0x00
  341. #define MOUSE_PRIMARY 0x01 // Button 1
  342. #define MOUSE_SECONDARY 0x02 // Button 2
  343. #define MOUSE_TERTIARY 0x03 // Button 3
  344. #define MOUSE_BUTTON(x) x
  345. // Continues to 0xFFFF, the higher the Mouse code, the selector significance descreases
  346. // Buttons can be defined as:
  347. // Sel - Selector
  348. // OOC - On/Off Control
  349. // MC - Momentary Control
  350. // OSC - One-Shot Control
  351. // depending on context.
  352. // List of System Controls - USB HID 1.12v2 pg 32
  353. // NKRO HID Supports 0x81 - 0xB7
  354. #define SYS_POWER_DOWN 0x81
  355. #define SYS_SLEEP 0x82
  356. #define SYS_WAKE_UP 0x83
  357. #define SYS_CONTEXT_MENU 0x84
  358. #define SYS_MAIN_MENU 0x85
  359. #define SYS_APP_MENU 0x86
  360. #define SYS_MENU_HELP 0x87
  361. #define SYS_MENU_EXIT 0x88
  362. #define SYS_MENU_SELECT 0x89
  363. #define SYS_MENU_RIGHT 0x8A
  364. #define SYS_MENU_LEFT 0x8B
  365. #define SYS_MENU_UP 0x8C
  366. #define SYS_MENU_DOWN 0x8D
  367. #define SYS_COLD_RESTART 0x8E
  368. #define SYS_WARM_RESTART 0x8F
  369. #define SYS_DPAD_UP 0x90
  370. #define SYS_DPAD_DOWN 0x91
  371. #define SYS_DPAD_RIGHT 0x92
  372. #define SYS_DPAD_LEFT 0x93
  373. // 0x94 - 0x9F Reserved
  374. #define SYS_DOCK 0xA0
  375. #define SYS_UNDOCK 0xA1
  376. #define SYS_SETUP 0xA2
  377. #define SYS_BREAK 0xA3
  378. #define SYS_DEBUGGER_BREAK 0xA4
  379. #define SYS_APP_BREAK 0xA5
  380. #define SYS_APP_DEBUGGER_BREAK 0xA6
  381. #define SYS_SPEAKER_MUTE 0xA7
  382. #define SYS_HIBERNATE 0xA8
  383. // 0xA9 - 0xAF Reserved
  384. #define SYS_DISP_INVERT 0xB0
  385. #define SYS_DISP_INTERNAL 0xB1
  386. #define SYS_DISP_EXTERNAL 0xB2
  387. #define SYS_DISP_BOTH 0xB3
  388. #define SYS_DISP_DUAL 0xB4
  389. #define SYS_DISP_TOGGLE_INT_EXT 0xB5
  390. #define SYS_DISP_SWAP_PRI_SEC 0xB6
  391. #define SYS_DISP_LCD_AUTOSCALE 0xB7
  392. // 0xB8 - 0xFFFF Reserved
  393. // List of Consumer Codes - USB HID 1.12v2
  394. // Only listing relevant ones, let me know if you need more -HaaTa
  395. // NKRO HID Supports 0x020 - 0x29C
  396. #define CONSUMER_10 0x020
  397. #define CONSUMER_100 0x021
  398. #define CONSUMER_AM_PM 0x022
  399. // 0x023 - 0x03F Reserved
  400. #define CONSUMER_POWER 0x030
  401. #define CONSUMER_RESET 0x031
  402. #define CONSUMER_SLEEP 0x032
  403. #define CONSUMER_SLEEP_AFTER 0x033
  404. #define CONSUMER_SLEEP_MODE 0x034
  405. #define CONSUMER_ILLUMINATION 0x035
  406. // 0x037 - 0x03F Reserved
  407. #define CONSUMER_MENU 0x040
  408. #define CONSUMER_MENU_PICK 0x041
  409. #define CONSUMER_MENU_UP 0x042
  410. #define CONSUMER_MENU_DOWN 0x043
  411. #define CONSUMER_MENU_LEFT 0x044
  412. #define CONSUMER_MENU_RIGHT 0x045
  413. #define CONSUMER_MENU_ESCAPE 0x046
  414. #define CONSUMER_MENU_VALUE_INCREASE 0x047
  415. #define CONSUMER_MENU_VALUE_DECREASE 0x048
  416. // 0x049 - 0x05F Reserved
  417. #define CONSUMER_DATA_ON_SCREEN 0x060
  418. #define CONSUMER_CLOSED_CAPTION 0x061
  419. #define CONSUMER_CLOSED_CAPTION_SELECT 0x062
  420. #define CONSUMER_VCR_TV 0x063
  421. #define CONSUMER_BROADCAST_MODE 0x064
  422. #define CONSUMER_SNAPSHOT 0x065
  423. #define CONSUMER_STILL 0x066
  424. // 0x067 - 0x07F Reserved
  425. #define CONSUMER_ASSIGN_SELECTION 0x081
  426. #define CONSUMER_MODE_STEP 0x082
  427. #define CONSUMER_RECALL_LAST 0x083
  428. #define CONSUMER_ENTER_CHANNEL 0x084
  429. #define CONSUMER_ORDER_MOVIE 0x085
  430. #define CONSUMER_MEDIA_COMPUTER 0x088
  431. #define CONSUMER_MEDIA_TV 0x089
  432. #define CONSUMER_MEDIA_WWW 0x08A
  433. #define CONSUMER_MEDIA_DVD 0x08B
  434. #define CONSUMER_MEDIA_TELEPHONE 0x08C
  435. #define CONSUMER_MEDIA_PROGRAM_GUIDE 0x08D
  436. #define CONSUMER_MEDIA_VIDEO_PHONE 0x08E
  437. #define CONSUMER_MEDIA_SELECT_GAMES 0x08F
  438. #define CONSUMER_MEDIA_SELECT_MESSAGES 0x090
  439. #define CONSUMER_MEDIA_SELECT_CD 0x091
  440. #define CONSUMER_MEDIA_SELECT_VCR 0x092
  441. #define CONSUMER_MEDIA_SELECT_TUNER 0x093
  442. #define CONSUMER_QUIT 0x094
  443. #define CONSUMER_HELP 0x095
  444. #define CONSUMER_MEDIA_SELECT_TAPE 0x096
  445. #define CONSUMER_MEDIA_SELECT_CABLE 0x097
  446. #define CONSUMER_MEDIA_SELECT_SATELLITE 0x098
  447. #define CONSUMER_MEDIA_SELECT_SECURITY 0x099
  448. #define CONSUMER_MEDIA_SELECT_HOME 0x09A
  449. #define CONSUMER_MEDIA_SELECT_CALL 0x09B
  450. #define CONSUMER_CHANNEL_INCREMENT 0x09C
  451. #define CONSUMER_CAHNNEL_DECREMENT 0x09D
  452. #define CONSUMER_MEDIA_SELECT_SAP 0x09E
  453. // 0x09F Reserved
  454. #define CONSUMER_VCR_PLUS 0x0A0
  455. #define CONSUMER_ONCE 0x0A1
  456. #define CONSUMER_DAILY 0x0A2
  457. #define CONSUMER_WEEKLY 0x0A3
  458. #define CONSUMER_MONTHLY 0x0A4
  459. // 0x0A5 - 0x0AF Reserved
  460. #define CONSUMER_PLAY 0x0B0
  461. #define CONSUMER_PAUSE 0x0B1
  462. #define CONSUMER_RECORD 0x0B2
  463. #define CONSUMER_FAST_FORWARD 0x0B3
  464. #define CONSUMER_REWIND 0x0B4
  465. #define CONSUMER_SCAN_NEXT_TRACK 0x0B5
  466. #define CONSUMER_SCAN_PREVIOUS_TRACK 0x0B6
  467. #define CONSUMER_STOP 0x0B7
  468. #define CONSUMER_EJECT 0x0B8
  469. #define CONSUMER_RANDOM_PLAY 0x0B9
  470. #define CONSUMER_REPEAT 0x0BC
  471. #define CONSUMER_TRACK_NORMAL 0x0BE
  472. #define CONSUMER_FRAME_FORWARD 0x0C0
  473. #define CONSUMER_FRAME_BACK 0x0C1
  474. #define CONSUMER_MARK 0x0C2
  475. #define CONSUMER_CLEAR_MARK 0x0C3
  476. #define CONSUMER_REPEAT_FROM_MARK 0x0C4
  477. #define CONSUMER_RETURN_TO_MARK 0x0C5
  478. #define CONSUMER_SEARCH_MARK_FORWARDS 0x0C6
  479. #define CONSUMER_SEARCH_MARK_BACKWARDS 0x0C7
  480. #define CONSUMER_COUNTER_RESET 0x0C8
  481. #define CONSUMER_SHOW_COUNTER 0x0C9
  482. #define CONSUMER_TRACKING_INCREMENT 0x0CA
  483. #define CONSUMER_TRACKING_DECREMENT 0x0CB
  484. #define CONSUMER_STOP_EJECT 0x0CC
  485. #define CONSUMER_PAUSE_PLAY 0x0CD
  486. #define CONSUMER_PLAY_SKIP 0x0CE
  487. // 0x0CF - 0x0DF Reserved
  488. #define CONSUMER_MUTE 0x0E2
  489. #define CONSUMER_BASS_BOOST 0x0E5
  490. #define CONSUMER_SURROUND_MODE 0x0E6
  491. #define CONSUMER_LOUDNESS 0x0E7
  492. #define CONSUMER_MPX 0x0E8
  493. #define CONSUMER_VOLUME_UP 0x0E9
  494. #define CONSUMER_VOLUME_DOWN 0x0EA
  495. // 0x0EB - 0x0EF Reserved
  496. #define CONSUMER_SPEED_SELECT 0x0F0
  497. #define CONSUMER_STANDARD_PLAY 0x0F2
  498. #define CONSUMER_LONG_PLAY 0x0F3
  499. #define CONSUMER_EXTENDED_PLAY 0x0F4
  500. #define CONSUMER_SLOW 0x0F5
  501. // 0x0F6 - 0x0FF
  502. #define CONSUMER_FAN_ENABLE 0x100
  503. #define CONSUMER_LIGHT_ENABLE 0x102
  504. #define CONSUMER_CLIMATE_CONTROL_ENABLE 0x104
  505. #define CONSUMER_SECURITY_ENABLE 0x106
  506. #define CONSUMER_FIRE_ALARM 0x107
  507. #define CONSUMER_MOTION 0x10A
  508. #define CONSUMER_DURESS_ALARM 0x10B
  509. #define CONSUMER_HOLDUP_ALARM 0x10C
  510. #define CONSUMER_MEDICAL_ALARM 0x10D
  511. // 0x10E - 0x14F Reserved
  512. #define CONSUMER_BALANCE_RIGHT 0x150
  513. #define CONSUMER_BALANCE_LEFT 0x151
  514. #define CONSUMER_BASS_INCR 0x152
  515. #define CONSUMER_BASS_DECR 0x153
  516. #define CONSUMER_TREBLE_INCR 0x154
  517. #define CONSUMER_TREBLE_DECR 0x155
  518. // 0x156 - 0x15F Reserved
  519. #define CONSUMER_SUB_CHANNEL_INCREMENT 0x171
  520. #define CONSUMER_SUB_CHANNEL_DECREMENT 0x172
  521. #define CONSUMER_ALT_AUDIO_INCREMENT 0x173
  522. #define CONSUMER_ALT_AUDIO_DECREMENT 0x174
  523. // List of Consumer Codes - USB HID 1.12v2
  524. // Application Launch Buttons pg 79
  525. #define AL_LAUNCH_BUTTON_CONFIG_TOOL 0x181
  526. #define AL_PROGRAMMABLE_BUTTON_CONFIG 0x182
  527. #define AL_CONSUMER_CONTROL_CONFIG 0x183
  528. #define AL_WORD_PROCESSOR 0x184
  529. #define AL_TEXT_EDITOR 0x185
  530. #define AL_SPREADSHEET 0x186
  531. #define AL_GRAPHICS_EDITOR 0x187
  532. #define AL_PRESENTATION_APP 0x188
  533. #define AL_DATABASE_APP 0x189
  534. #define AL_EMAIL_READER 0x18A
  535. #define AL_NEWSREADER 0x18B
  536. #define AL_VOICEMAIL 0x18C
  537. #define AL_CONTACTS_ADDRESS_BOOK 0x18D
  538. #define AL_CALENDAR_SCHEDULE 0x18E
  539. #define AL_TASK_PROJECT_MANAGER 0x18F
  540. #define AL_LOG_JOURNAL_TIMECARD 0x190
  541. #define AL_CHECKBOOK_FINANCE 0x191
  542. #define AL_CALCULATOR 0x192
  543. #define AL_A_V_CAPTURE_PLAYBACK 0x193
  544. #define AL_LOCAL_MACHINE_BROWSER 0x194
  545. #define AL_LAN_WAN_BROWSER 0x195
  546. #define AL_INTERNET_BROWSER 0x196
  547. #define AL_REMOTE_NETWORKING_ISP_CONNECT 0x197
  548. #define AL_NETWORK_CONFERENCE 0x198
  549. #define AL_NETWORK_CHAT 0x199
  550. #define AL_TELEPHONY_DIALER 0x19A
  551. #define AL_LOGON 0x19B
  552. #define AL_LOGOFF 0x19C
  553. #define AL_LOGON_LOGOFF 0x19D
  554. #define AL_TERMINAL_LOCK_SCREENSAVER 0x19E
  555. #define AL_CONTROL_PANEL 0x19F
  556. #define AL_COMMAND_LINE_PROCESSOR_RUN 0x1A0
  557. #define AL_PROCESS_TASK_MANAGER 0x1A1
  558. #define AL_SELECT_TAST_APP 0x1A2
  559. #define AL_NEXT_TASK_APP 0x1A3
  560. #define AL_PREVIOUS_TASK_APP 0x1A4
  561. #define AL_PREEMPTIVE_HALT_TASK_APP 0x1A5
  562. #define AL_INTEGRATED_HELP_CENTER 0x1A6
  563. #define AL_DOCUMENTS 0x1A7
  564. #define AL_THESAURUS 0x1A8
  565. #define AL_DICTIONARY 0x1A9
  566. #define AL_DESKTOP 0x1AA
  567. #define AL_SPELL_CHECK 0x1AB
  568. #define AL_GRAMMAR_CHECK 0x1AC
  569. #define AL_WIRELESS_STATUS 0x1AD
  570. #define AL_KEYBOARD_LAYOUT 0x1AE
  571. #define AL_VIRUS_PROTECTION 0x1AF
  572. #define AL_ENCRYPTION 0x1B0
  573. #define AL_SCREEN_SAVER 0x1B1
  574. #define AL_ALARMS 0x1B2
  575. #define AL_CLOCK 0x1B3
  576. #define AL_FILE_BROWSER 0x1B4
  577. #define AL_POWER_STATUS 0x1B5
  578. #define AL_IMAGE_BROWSER 0x1B6
  579. #define AL_AUDIO_BROWSER 0x1B7
  580. #define AL_MOVIE_BROWSER 0x1B8
  581. #define AL_DIGITAL_RIGHTS_MANAGER 0x1B9
  582. #define AL_DIGITAL_WALLET 0x1BA
  583. // 0x1BB Reserved
  584. #define AL_INSTANT_MESSAGING 0x1BC
  585. #define AL_OEM_FEATURES_TIPS_TUTORIAL 0x1BD
  586. #define AL_OEM_HELP 0x1BE
  587. #define AL_ONLINE_COMMUNITY 0x1BF
  588. #define AL_ENTERTAINMENT_CONTENT 0x1C0
  589. #define AL_ONLINE_SHOPPING 0x1C1
  590. #define AL_SMARTCARD_INFO_HELP 0x1C2
  591. #define AL_MARKET_MONITOR 0x1C3
  592. #define AL_CUSTOMIZED_CORP_NEWS 0x1C4
  593. #define AL_ONLINE_ACTIVITY 0x1C5
  594. #define AL_SEARCH_BROWSER 0x1C6
  595. #define AL_AUDIO_PLAYER 0x1C7
  596. // List of Consumer Codes - USB HID 1.12v2
  597. // Generic GUI Application Controls pg 82
  598. #define AC_NEW 0x201
  599. #define AC_OPEN 0x202
  600. #define AC_CLOSE 0x203
  601. #define AC_EXIT 0x204
  602. #define AC_MAXIMIZE 0x205
  603. #define AC_MINIMIZE 0x206
  604. #define AC_SAVE 0x207
  605. #define AC_PRINT 0x208
  606. #define AC_PROPERTIES 0x209
  607. #define AC_UNDO 0x21A
  608. #define AC_COPY 0x21B
  609. #define AC_CUT 0x21C
  610. #define AC_PASTE 0x21D
  611. #define AC_SELECT_ALL 0x21E
  612. #define AC_FIND 0x21F
  613. #define AC_FIND_AND_REPLACE 0x220
  614. #define AC_SEARCH 0x221
  615. #define AC_GO_TO 0x222
  616. #define AC_HOME 0x223
  617. #define AC_BACK 0x224
  618. #define AC_FORWARD 0x225
  619. #define AC_STOP 0x226
  620. #define AC_REFRESH 0x227
  621. #define AC_PREVIOUS_LINK 0x228
  622. #define AC_NEXT_LINK 0x229
  623. #define AC_BOOKMARKS 0x22A
  624. #define AC_HISTORY 0x22B
  625. #define AC_SUBSCRIPTIONS 0x22C
  626. #define AC_ZOOM_IN 0x22D
  627. #define AC_ZOOM_OUT 0x22E
  628. #define AC_ZOOM 0x22F
  629. #define AC_FULL_SCREEN_VIEW 0x230
  630. #define AC_NORMAL_VIEW 0x231
  631. #define AC_VIEW_TOGGLE 0x232
  632. #define AC_SCROLL_UP 0x233
  633. #define AC_SCROLL_DOWN 0x234
  634. #define AC_SCROLL 0x235
  635. #define AC_PAN_LEFT 0x236
  636. #define AC_PAN_RIGHT 0x237
  637. #define AC_PAN 0x238
  638. #define AC_NEW_WINDOW 0x239
  639. #define AC_TILE_HORIZONTALLY 0x23A
  640. #define AC_TILE_VERTICALLY 0x23B
  641. #define AC_FORMAT 0x23C
  642. #define AC_EDIT 0x23D
  643. #define AC_BOLD 0x23E
  644. #define AC_ITALICS 0x23F
  645. #define AC_UNDERLINE 0x240
  646. #define AC_STRIKETHROUGH 0x241
  647. #define AC_SUBSCRIPT 0x242
  648. #define AC_SUPERSCRIPT 0x243
  649. #define AC_ALL_CAPS 0x244
  650. #define AC_ROTATE 0x245
  651. #define AC_RESIZE 0x246
  652. #define AC_FILP_HORIZONTAL 0x247
  653. #define AC_FILP_VERTICAL 0x248
  654. #define AC_MIRROR_HORIZONTAL 0x249
  655. #define AC_MIRROR_VERTICAL 0x24A
  656. #define AC_FONT_SELECT 0x24B
  657. #define AC_FONT_COLOR 0x24C
  658. #define AC_FONT_SIZE 0x24D
  659. #define AC_JUSTIFY_LEFT 0x24E
  660. #define AC_JUSTIFY_CENTER_H 0x24F
  661. #define AC_JUSTIFY_RIGHT 0x250
  662. #define AC_JUSTIFY_BLOCK_H 0x251
  663. #define AC_JUSTIFY_TOP 0x252
  664. #define AC_JUSTIFY_CENTER_V 0x253
  665. #define AC_JUSTIFY_BOTTOM 0x254
  666. #define AC_JUSTIFY_BLOCK_V 0x255
  667. #define AC_INDENT_DECREASE 0x256
  668. #define AC_INDENT_INCREASE 0x257
  669. #define AC_NUMBERED_LIST 0x258
  670. #define AC_RESTART_NUMBERING 0x259
  671. #define AC_BULLETED_LIST 0x25A
  672. #define AC_PROMOTE 0x25B
  673. #define AC_DEMOTE 0x25C
  674. #define AC_YES 0x25D
  675. #define AC_NO 0x25E
  676. #define AC_CANCEL 0x25F
  677. #define AC_CATALOG 0x260
  678. #define AC_BUY_CHECKOUT 0x261
  679. #define AC_ADD_TO_CART 0x262
  680. #define AC_EXPAND 0x263
  681. #define AC_EXPAND_ALL 0x264
  682. #define AC_COLLAPSE 0x265
  683. #define AC_COLLAPSE_ALL 0x266
  684. #define AC_PRINT_PREVIEW 0x267
  685. #define AC_PASTE_SPECIAL 0x268
  686. #define AC_INSERT_MODE 0x269
  687. #define AC_DELETE 0x26A
  688. #define AC_LOCK 0x26B
  689. #define AC_UNLOCK 0x26C
  690. #define AC_PROTECT 0x26D
  691. #define AC_UNPROTECT 0x26E
  692. #define AC_ATTACH_COMMENT 0x26F
  693. #define AC_DELETE_COMMENT 0x270
  694. #define AC_VIEW_COMMENT 0x271
  695. #define AC_SELECT_WORD 0x272
  696. #define AC_SELECT_SENTENCE 0x273
  697. #define AC_SELECT_PARAGRAPH 0x274
  698. #define AC_SELECT_COLUMN 0x275
  699. #define AC_SELECT_ROW 0x276
  700. #define AC_SELECT_TABLE 0x277
  701. #define AC_SELECT_OBJECT 0x278
  702. #define AC_REDO_REPEAT 0x279
  703. #define AC_SORT 0x27A
  704. #define AC_SORT_ASCENDING 0x27B
  705. #define AC_SORT_DESCENDING 0x27C
  706. #define AC_FILTER 0x27D
  707. #define AC_SET_CLOCK 0x27E
  708. #define AC_VIEW_CLOCK 0x27F
  709. #define AC_SELECT_TIME_ZONE 0x280
  710. #define AC_EDIT_TIME_ZONE 0x281
  711. #define AC_SET_ALARM 0x282
  712. #define AC_CLEAR_ALARM 0x283
  713. #define AC_SNOOZE_ALARM 0x284
  714. #define AC_RESET_ALARM 0x285
  715. #define AC_SYNCHRONIZE 0x286
  716. #define AC_SEND_RECEIVE 0x287
  717. #define AC_SEND_TO 0x288
  718. #define AC_REPLY 0x289
  719. #define AC_REPLY_ALL 0x28A
  720. #define AC_FORWARD_MSG 0x28B
  721. #define AC_SEND 0x28C
  722. #define AC_ATTACH_FILE 0x28D
  723. #define AC_UPLOAD 0x28E
  724. #define AC_DOWNLOAD 0x28F
  725. #define AC_SET_BORDERS 0x290
  726. #define AC_INSERT_ROW 0x291
  727. #define AC_INSERT_COLUMN 0x292
  728. #define AC_INSERT_FILE 0x293
  729. #define AC_INSERT_PICTURE 0x294
  730. #define AC_INSERT_OBJECT 0x295
  731. #define AC_INSERT_SYMBOL 0x296
  732. #define AC_SAVE_AND_CLOSE 0x297
  733. #define AC_RENAME 0x298
  734. #define AC_MERGE 0x299
  735. #define AC_SPLIT 0x29A
  736. #define AC_DISTRIBUTE_HORIZONTALLY 0x29B
  737. #define AC_DISTRIBUTE_VERTICALLY 0x29C
  738. // 0x29D-0xFFFF Reserved