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