1 /* Copyright (C) 2011-2015 by Jacob Alexander
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:
10 * The above copyright notice and this permission notice shall be included in
11 * all copies or substantial portions of the Software.
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
24 // ----- Defines -----
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)
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
70 #define KEY_ENTER 0x28
72 #define KEY_BACKSPACE 0x2A
74 #define KEY_SPACE 0x2C
75 #define KEY_MINUS 0x2D
76 #define KEY_EQUAL 0x2E
77 #define KEY_LEFT_BRACKET 0x2F
78 #define KEY_RIGHT_BRACKET 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
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
108 #define KEY_PAGE_DOWN 0x4E
109 #define KEY_RIGHT 0x4F
110 #define KEY_LEFT 0x50
111 #define KEY_DOWN 0x51
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
132 #define KEYBOARD_STATUS 0x66 // Used for indicating keyboard is on/status/errors, not a key
133 #define KEYPAD_EQUAL 0x67
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
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
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).
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
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
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:
358 // OOC - On/Off Control
359 // MC - Momentary Control
360 // OSC - One-Shot Control
361 // depending on context.
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
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
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 - 0x06E Reserved?
442 #define CONSUMER_BRIGHTNESS_INCREMENT 0x06F
443 #define CONSUMER_BRIGHTNESS_DECREMENT 0x070
445 #define CONSUMER_BACKLIGHT_TOGGLE 0x072
446 #define CONSUMER_BRIGHTNESS_MIN 0x073
447 #define CONSUMER_BRIGHTNESS_MAX 0x074
448 #define CONSUMER_BRIGHTNESS_AUTO 0x075
449 // 0x076 - 0x07F Reserved
451 #define CONSUMER_ASSIGN_SELECTION 0x081
452 #define CONSUMER_MODE_STEP 0x082
453 #define CONSUMER_RECALL_LAST 0x083
454 #define CONSUMER_ENTER_CHANNEL 0x084
455 #define CONSUMER_ORDER_MOVIE 0x085
457 #define CONSUMER_MEDIA_COMPUTER 0x088
458 #define CONSUMER_MEDIA_TV 0x089
459 #define CONSUMER_MEDIA_WWW 0x08A
460 #define CONSUMER_MEDIA_DVD 0x08B
461 #define CONSUMER_MEDIA_TELEPHONE 0x08C
462 #define CONSUMER_MEDIA_PROGRAM_GUIDE 0x08D
463 #define CONSUMER_MEDIA_VIDEO_PHONE 0x08E
464 #define CONSUMER_MEDIA_SELECT_GAMES 0x08F
465 #define CONSUMER_MEDIA_SELECT_MESSAGES 0x090
466 #define CONSUMER_MEDIA_SELECT_CD 0x091
467 #define CONSUMER_MEDIA_SELECT_VCR 0x092
468 #define CONSUMER_MEDIA_SELECT_TUNER 0x093
469 #define CONSUMER_QUIT 0x094
470 #define CONSUMER_HELP 0x095
471 #define CONSUMER_MEDIA_SELECT_TAPE 0x096
472 #define CONSUMER_MEDIA_SELECT_CABLE 0x097
473 #define CONSUMER_MEDIA_SELECT_SATELLITE 0x098
474 #define CONSUMER_MEDIA_SELECT_SECURITY 0x099
475 #define CONSUMER_MEDIA_SELECT_HOME 0x09A
476 #define CONSUMER_MEDIA_SELECT_CALL 0x09B
477 #define CONSUMER_CHANNEL_INCREMENT 0x09C
478 #define CONSUMER_CAHNNEL_DECREMENT 0x09D
479 #define CONSUMER_MEDIA_SELECT_SAP 0x09E
481 #define CONSUMER_VCR_PLUS 0x0A0
482 #define CONSUMER_ONCE 0x0A1
483 #define CONSUMER_DAILY 0x0A2
484 #define CONSUMER_WEEKLY 0x0A3
485 #define CONSUMER_MONTHLY 0x0A4
486 // 0x0A5 - 0x0AF Reserved
487 #define CONSUMER_PLAY 0x0B0
488 #define CONSUMER_PAUSE 0x0B1
489 #define CONSUMER_RECORD 0x0B2
490 #define CONSUMER_FAST_FORWARD 0x0B3
491 #define CONSUMER_REWIND 0x0B4
492 #define CONSUMER_SCAN_NEXT_TRACK 0x0B5
493 #define CONSUMER_SCAN_PREVIOUS_TRACK 0x0B6
494 #define CONSUMER_STOP 0x0B7
495 #define CONSUMER_EJECT 0x0B8
496 #define CONSUMER_RANDOM_PLAY 0x0B9
498 #define CONSUMER_REPEAT 0x0BC
500 #define CONSUMER_TRACK_NORMAL 0x0BE
502 #define CONSUMER_FRAME_FORWARD 0x0C0
503 #define CONSUMER_FRAME_BACK 0x0C1
504 #define CONSUMER_MARK 0x0C2
505 #define CONSUMER_CLEAR_MARK 0x0C3
506 #define CONSUMER_REPEAT_FROM_MARK 0x0C4
507 #define CONSUMER_RETURN_TO_MARK 0x0C5
508 #define CONSUMER_SEARCH_MARK_FORWARDS 0x0C6
509 #define CONSUMER_SEARCH_MARK_BACKWARDS 0x0C7
510 #define CONSUMER_COUNTER_RESET 0x0C8
511 #define CONSUMER_SHOW_COUNTER 0x0C9
512 #define CONSUMER_TRACKING_INCREMENT 0x0CA
513 #define CONSUMER_TRACKING_DECREMENT 0x0CB
514 #define CONSUMER_STOP_EJECT 0x0CC
515 #define CONSUMER_PAUSE_PLAY 0x0CD
516 #define CONSUMER_PLAY_SKIP 0x0CE
517 // 0x0CF - 0x0DF Reserved
519 #define CONSUMER_MUTE 0x0E2
521 #define CONSUMER_BASS_BOOST 0x0E5
522 #define CONSUMER_SURROUND_MODE 0x0E6
523 #define CONSUMER_LOUDNESS 0x0E7
524 #define CONSUMER_MPX 0x0E8
525 #define CONSUMER_VOLUME_UP 0x0E9
526 #define CONSUMER_VOLUME_DOWN 0x0EA
527 // 0x0EB - 0x0EF Reserved
528 #define CONSUMER_SPEED_SELECT 0x0F0
529 #define CONSUMER_STANDARD_PLAY 0x0F2
530 #define CONSUMER_LONG_PLAY 0x0F3
531 #define CONSUMER_EXTENDED_PLAY 0x0F4
532 #define CONSUMER_SLOW 0x0F5
534 #define CONSUMER_FAN_ENABLE 0x100
536 #define CONSUMER_LIGHT_ENABLE 0x102
538 #define CONSUMER_CLIMATE_CONTROL_ENABLE 0x104
540 #define CONSUMER_SECURITY_ENABLE 0x106
541 #define CONSUMER_FIRE_ALARM 0x107
543 #define CONSUMER_MOTION 0x10A
544 #define CONSUMER_DURESS_ALARM 0x10B
545 #define CONSUMER_HOLDUP_ALARM 0x10C
546 #define CONSUMER_MEDICAL_ALARM 0x10D
547 // 0x10E - 0x14F Reserved
548 #define CONSUMER_BALANCE_RIGHT 0x150
549 #define CONSUMER_BALANCE_LEFT 0x151
550 #define CONSUMER_BASS_INCR 0x152
551 #define CONSUMER_BASS_DECR 0x153
552 #define CONSUMER_TREBLE_INCR 0x154
553 #define CONSUMER_TREBLE_DECR 0x155
554 // 0x156 - 0x15F Reserved
556 #define CONSUMER_SUB_CHANNEL_INCREMENT 0x171
557 #define CONSUMER_SUB_CHANNEL_DECREMENT 0x172
558 #define CONSUMER_ALT_AUDIO_INCREMENT 0x173
559 #define CONSUMER_ALT_AUDIO_DECREMENT 0x174
563 // List of Consumer Codes - USB HID 1.12v2
564 // Application Launch Buttons pg 79
565 #define AL_LAUNCH_BUTTON_CONFIG_TOOL 0x181
566 #define AL_PROGRAMMABLE_BUTTON_CONFIG 0x182
567 #define AL_CONSUMER_CONTROL_CONFIG 0x183
568 #define AL_WORD_PROCESSOR 0x184
569 #define AL_TEXT_EDITOR 0x185
570 #define AL_SPREADSHEET 0x186
571 #define AL_GRAPHICS_EDITOR 0x187
572 #define AL_PRESENTATION_APP 0x188
573 #define AL_DATABASE_APP 0x189
574 #define AL_EMAIL_READER 0x18A
575 #define AL_NEWSREADER 0x18B
576 #define AL_VOICEMAIL 0x18C
577 #define AL_CONTACTS_ADDRESS_BOOK 0x18D
578 #define AL_CALENDAR_SCHEDULE 0x18E
579 #define AL_TASK_PROJECT_MANAGER 0x18F
580 #define AL_LOG_JOURNAL_TIMECARD 0x190
581 #define AL_CHECKBOOK_FINANCE 0x191
582 #define AL_CALCULATOR 0x192
583 #define AL_A_V_CAPTURE_PLAYBACK 0x193
584 #define AL_LOCAL_MACHINE_BROWSER 0x194
585 #define AL_LAN_WAN_BROWSER 0x195
586 #define AL_INTERNET_BROWSER 0x196
587 #define AL_REMOTE_NETWORKING_ISP_CONNECT 0x197
588 #define AL_NETWORK_CONFERENCE 0x198
589 #define AL_NETWORK_CHAT 0x199
590 #define AL_TELEPHONY_DIALER 0x19A
591 #define AL_LOGON 0x19B
592 #define AL_LOGOFF 0x19C
593 #define AL_LOGON_LOGOFF 0x19D
594 #define AL_TERMINAL_LOCK_SCREENSAVER 0x19E
595 #define AL_CONTROL_PANEL 0x19F
596 #define AL_COMMAND_LINE_PROCESSOR_RUN 0x1A0
597 #define AL_PROCESS_TASK_MANAGER 0x1A1
598 #define AL_SELECT_TAST_APP 0x1A2
599 #define AL_NEXT_TASK_APP 0x1A3
600 #define AL_PREVIOUS_TASK_APP 0x1A4
601 #define AL_PREEMPTIVE_HALT_TASK_APP 0x1A5
602 #define AL_INTEGRATED_HELP_CENTER 0x1A6
603 #define AL_DOCUMENTS 0x1A7
604 #define AL_THESAURUS 0x1A8
605 #define AL_DICTIONARY 0x1A9
606 #define AL_DESKTOP 0x1AA
607 #define AL_SPELL_CHECK 0x1AB
608 #define AL_GRAMMAR_CHECK 0x1AC
609 #define AL_WIRELESS_STATUS 0x1AD
610 #define AL_KEYBOARD_LAYOUT 0x1AE
611 #define AL_VIRUS_PROTECTION 0x1AF
612 #define AL_ENCRYPTION 0x1B0
613 #define AL_SCREEN_SAVER 0x1B1
614 #define AL_ALARMS 0x1B2
615 #define AL_CLOCK 0x1B3
616 #define AL_FILE_BROWSER 0x1B4
617 #define AL_POWER_STATUS 0x1B5
618 #define AL_IMAGE_BROWSER 0x1B6
619 #define AL_AUDIO_BROWSER 0x1B7
620 #define AL_MOVIE_BROWSER 0x1B8
621 #define AL_DIGITAL_RIGHTS_MANAGER 0x1B9
622 #define AL_DIGITAL_WALLET 0x1BA
624 #define AL_INSTANT_MESSAGING 0x1BC
625 #define AL_OEM_FEATURES_TIPS_TUTORIAL 0x1BD
626 #define AL_OEM_HELP 0x1BE
627 #define AL_ONLINE_COMMUNITY 0x1BF
628 #define AL_ENTERTAINMENT_CONTENT 0x1C0
629 #define AL_ONLINE_SHOPPING 0x1C1
630 #define AL_SMARTCARD_INFO_HELP 0x1C2
631 #define AL_MARKET_MONITOR 0x1C3
632 #define AL_CUSTOMIZED_CORP_NEWS 0x1C4
633 #define AL_ONLINE_ACTIVITY 0x1C5
634 #define AL_SEARCH_BROWSER 0x1C6
635 #define AL_AUDIO_PLAYER 0x1C7
639 // List of Consumer Codes - USB HID 1.12v2
640 // Generic GUI Application Controls pg 82
642 #define AC_OPEN 0x202
643 #define AC_CLOSE 0x203
644 #define AC_EXIT 0x204
645 #define AC_MAXIMIZE 0x205
646 #define AC_MINIMIZE 0x206
647 #define AC_SAVE 0x207
648 #define AC_PRINT 0x208
649 #define AC_PROPERTIES 0x209
650 #define AC_UNDO 0x21A
651 #define AC_COPY 0x21B
653 #define AC_PASTE 0x21D
654 #define AC_SELECT_ALL 0x21E
655 #define AC_FIND 0x21F
656 #define AC_FIND_AND_REPLACE 0x220
657 #define AC_SEARCH 0x221
658 #define AC_GO_TO 0x222
659 #define AC_HOME 0x223
660 #define AC_BACK 0x224
661 #define AC_FORWARD 0x225
662 #define AC_STOP 0x226
663 #define AC_REFRESH 0x227
664 #define AC_PREVIOUS_LINK 0x228
665 #define AC_NEXT_LINK 0x229
666 #define AC_BOOKMARKS 0x22A
667 #define AC_HISTORY 0x22B
668 #define AC_SUBSCRIPTIONS 0x22C
669 #define AC_ZOOM_IN 0x22D
670 #define AC_ZOOM_OUT 0x22E
671 #define AC_ZOOM 0x22F
672 #define AC_FULL_SCREEN_VIEW 0x230
673 #define AC_NORMAL_VIEW 0x231
674 #define AC_VIEW_TOGGLE 0x232
675 #define AC_SCROLL_UP 0x233
676 #define AC_SCROLL_DOWN 0x234
677 #define AC_SCROLL 0x235
678 #define AC_PAN_LEFT 0x236
679 #define AC_PAN_RIGHT 0x237
681 #define AC_NEW_WINDOW 0x239
682 #define AC_TILE_HORIZONTALLY 0x23A
683 #define AC_TILE_VERTICALLY 0x23B
684 #define AC_FORMAT 0x23C
685 #define AC_EDIT 0x23D
686 #define AC_BOLD 0x23E
687 #define AC_ITALICS 0x23F
688 #define AC_UNDERLINE 0x240
689 #define AC_STRIKETHROUGH 0x241
690 #define AC_SUBSCRIPT 0x242
691 #define AC_SUPERSCRIPT 0x243
692 #define AC_ALL_CAPS 0x244
693 #define AC_ROTATE 0x245
694 #define AC_RESIZE 0x246
695 #define AC_FILP_HORIZONTAL 0x247
696 #define AC_FILP_VERTICAL 0x248
697 #define AC_MIRROR_HORIZONTAL 0x249
698 #define AC_MIRROR_VERTICAL 0x24A
699 #define AC_FONT_SELECT 0x24B
700 #define AC_FONT_COLOR 0x24C
701 #define AC_FONT_SIZE 0x24D
702 #define AC_JUSTIFY_LEFT 0x24E
703 #define AC_JUSTIFY_CENTER_H 0x24F
704 #define AC_JUSTIFY_RIGHT 0x250
705 #define AC_JUSTIFY_BLOCK_H 0x251
706 #define AC_JUSTIFY_TOP 0x252
707 #define AC_JUSTIFY_CENTER_V 0x253
708 #define AC_JUSTIFY_BOTTOM 0x254
709 #define AC_JUSTIFY_BLOCK_V 0x255
710 #define AC_INDENT_DECREASE 0x256
711 #define AC_INDENT_INCREASE 0x257
712 #define AC_NUMBERED_LIST 0x258
713 #define AC_RESTART_NUMBERING 0x259
714 #define AC_BULLETED_LIST 0x25A
715 #define AC_PROMOTE 0x25B
716 #define AC_DEMOTE 0x25C
719 #define AC_CANCEL 0x25F
720 #define AC_CATALOG 0x260
721 #define AC_BUY_CHECKOUT 0x261
722 #define AC_ADD_TO_CART 0x262
723 #define AC_EXPAND 0x263
724 #define AC_EXPAND_ALL 0x264
725 #define AC_COLLAPSE 0x265
726 #define AC_COLLAPSE_ALL 0x266
727 #define AC_PRINT_PREVIEW 0x267
728 #define AC_PASTE_SPECIAL 0x268
729 #define AC_INSERT_MODE 0x269
730 #define AC_DELETE 0x26A
731 #define AC_LOCK 0x26B
732 #define AC_UNLOCK 0x26C
733 #define AC_PROTECT 0x26D
734 #define AC_UNPROTECT 0x26E
735 #define AC_ATTACH_COMMENT 0x26F
736 #define AC_DELETE_COMMENT 0x270
737 #define AC_VIEW_COMMENT 0x271
738 #define AC_SELECT_WORD 0x272
739 #define AC_SELECT_SENTENCE 0x273
740 #define AC_SELECT_PARAGRAPH 0x274
741 #define AC_SELECT_COLUMN 0x275
742 #define AC_SELECT_ROW 0x276
743 #define AC_SELECT_TABLE 0x277
744 #define AC_SELECT_OBJECT 0x278
745 #define AC_REDO_REPEAT 0x279
746 #define AC_SORT 0x27A
747 #define AC_SORT_ASCENDING 0x27B
748 #define AC_SORT_DESCENDING 0x27C
749 #define AC_FILTER 0x27D
750 #define AC_SET_CLOCK 0x27E
751 #define AC_VIEW_CLOCK 0x27F
752 #define AC_SELECT_TIME_ZONE 0x280
753 #define AC_EDIT_TIME_ZONE 0x281
754 #define AC_SET_ALARM 0x282
755 #define AC_CLEAR_ALARM 0x283
756 #define AC_SNOOZE_ALARM 0x284
757 #define AC_RESET_ALARM 0x285
758 #define AC_SYNCHRONIZE 0x286
759 #define AC_SEND_RECEIVE 0x287
760 #define AC_SEND_TO 0x288
761 #define AC_REPLY 0x289
762 #define AC_REPLY_ALL 0x28A
763 #define AC_FORWARD_MSG 0x28B
764 #define AC_SEND 0x28C
765 #define AC_ATTACH_FILE 0x28D
766 #define AC_UPLOAD 0x28E
767 #define AC_DOWNLOAD 0x28F
768 #define AC_SET_BORDERS 0x290
769 #define AC_INSERT_ROW 0x291
770 #define AC_INSERT_COLUMN 0x292
771 #define AC_INSERT_FILE 0x293
772 #define AC_INSERT_PICTURE 0x294
773 #define AC_INSERT_OBJECT 0x295
774 #define AC_INSERT_SYMBOL 0x296
775 #define AC_SAVE_AND_CLOSE 0x297
776 #define AC_RENAME 0x298
777 #define AC_MERGE 0x299
778 #define AC_SPLIT 0x29A
779 #define AC_DISTRIBUTE_HORIZONTALLY 0x29B
780 #define AC_DISTRIBUTE_VERTICALLY 0x29C
781 #define AC_NEXT_KEYBOARD_LAYOUT_SEL 0x29D
782 // 0x29E-0xFFFF Reserved