-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathUSB_scan_codes.h
246 lines (238 loc) · 10.1 KB
/
USB_scan_codes.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
#ifndef __USB_scan_codes_h__
#define __USB_scan_codes_h__
#define KEY_NULL 0x00 // Reserved (no event indicated)
#define KEY_ErrorRollOver 0x01 // Keyboard ErrorRollOver
#define KEY_POSTFail 0x02 // Keyboard POSTFail
#define KEY_ErrorUndefined 0x03 // Keyboard ErrorUndefined
#define KEY_A 0x04 // Keyboard a and A
#define KEY_B 0x05 // Keyboard b and B
#define KEY_C 0x06 // Keyboard c and C
#define KEY_D 0x07 // Keyboard d and D
#define KEY_E 0x08 // Keyboard e and E
#define KEY_F 0x09 // Keyboard f and F
#define KEY_G 0x0A // Keyboard g and G
#define KEY_H 0x0B // Keyboard h and H
#define KEY_I 0x0C // Keyboard i and I
#define KEY_J 0x0D // Keyboard j and J
#define KEY_K 0x0E // Keyboard k and K
#define KEY_L 0x0F // Keyboard l and L
#define KEY_M 0x10 // Keyboard m and M
#define KEY_N 0x11 // Keyboard n and N
#define KEY_O 0x12 // Keyboard o and O
#define KEY_P 0x13 // Keyboard p and P
#define KEY_Q 0x14 // Keyboard q and Q
#define KEY_R 0x15 // Keyboard r and R
#define KEY_S 0x16 // Keyboard s and S
#define KEY_T 0x17 // Keyboard t and T
#define KEY_U 0x18 // Keyboard u and U
#define KEY_V 0x19 // Keyboard v and V
#define KEY_W 0x1A // Keyboard w and W
#define KEY_X 0x1B // Keyboard x and X
#define KEY_Y 0x1C // Keyboard y and Y
#define KEY_Z 0x1D // Keyboard z and Z
#define KEY_1 0x1E // Keyboard 1 and !
#define KEY_2 0x1F // Keyboard 2 and @
#define KEY_3 0x20 // Keyboard 3 and #
#define KEY_4 0x21 // Keyboard 4 and $
#define KEY_5 0x22 // Keyboard 5 and %
#define KEY_6 0x23 // Keyboard 6 and ^
#define KEY_7 0x24 // Keyboard 7 and &
#define KEY_8 0x25 // Keyboard 8 and *
#define KEY_9 0x26 // Keyboard 9 and (
#define KEY_0 0x27 // Keyboard 0 and )
#define KEY_ENTER 0x28 // Keyboard Return (ENTER)
#define KEY_ESCAPE 0x29 // Keyboard ESCAPE
#define KEY_BACKSPACE 0x2A // Keyboard DELETE (Backspace)
#define KEY_TAB 0x2B // Keyboard Tab
#define KEY_SPACEBAR 0x2C // Keyboard Spacebar
#define KEY_MINUS 0x2D // Keyboard - and (underscore)
#define KEY_EQUAL 0x2E // Keyboard = and +
#define KEY_LEFTBRACE 0x2F // Keyboard [ and {
#define KEY_RIGHTBRACE 0x30 // Keyboard ] and }
#define KEY_BACKSLASH 0x31 // Keyboard \ and |
#define KEY_HASH_TILDE 0x32 // Keyboard Non-US # and ~
#define KEY_SEMICOLON 0x33 // Keyboard ; and :
#define KEY_APOSTROPHE 0x34 // Keyboard ' and "
#define KEY_GRAVE 0x35 // Keyboard Grave Accent and Tilde
#define KEY_COMMA 0x36 // Keyboard , and <
#define KEY_DOT 0x37 // Keyboard . and >
#define KEY_SLASH 0x38 // Keyboard / and ?
#define KEY_CAPSLOCK 0x39 // Keyboard Caps Lock
#define KEY_F1 0x3A // Keyboard F1
#define KEY_F2 0x3B // Keyboard F2
#define KEY_F3 0x3C // Keyboard F3
#define KEY_F4 0x3D // Keyboard F4
#define KEY_F5 0x3E // Keyboard F5
#define KEY_F6 0x3F // Keyboard F6
#define KEY_F7 0x40 // Keyboard F7
#define KEY_F8 0x41 // Keyboard F8
#define KEY_F9 0x42 // Keyboard F9
#define KEY_F10 0x43 // Keyboard F10
#define KEY_F11 0x44 // Keyboard F11
#define KEY_F12 0x45 // Keyboard F12
#define KEY_PRINTSCREEN 0x46 // Keyboard PrintScreen
#define KEY_SCROLLOCK 0x47 // Keyboard Scroll Lock
#define KEY_PAUSE 0x48 // Keyboard Pause
#define KEY_INSERT 0x49 // Keyboard Insert
#define KEY_HOME 0x4A // Keyboard Home
#define KEY_PAGEUP 0x4B // Keyboard PageUp
#define KEY_DELETE 0x4C // Keyboard Delete Forward
#define KEY_END 0x4D // Keyboard End
#define KEY_PAGEDOWN 0x4E // Keyboard PageDown
#define KEY_RIGHT 0x4F // Keyboard RightArrow
#define KEY_LEFT 0x50 // Keyboard LeftArrow
#define KEY_DOWN 0x51 // Keyboard DownArrow
#define KEY_UP 0x52 // Keyboard UpArrow
#define KEY_NUMLOCK 0x53 // Keypad Num Lock and Clear
#define KEY_KP_SLASH 0x54 // Keypad /
#define KEY_KP_ASTERISK 0x55 // Keypad *
#define KEY_KP_MINUS 0x56 // Keypad -
#define KEY_KP_PLUS 0x57 // Keypad +
#define KEY_KP_ENTER 0x58 // Keypad ENTER
#define KEY_KP_1 0x59 // Keypad 1 and End
#define KEY_KP_2 0x5A // Keypad 2 and Down Arrow
#define KEY_KP_3 0x5B // Keypad 3 and PageDn
#define KEY_KP_4 0x5C // Keypad 4 and Left Arrow
#define KEY_KP_5 0x5D // Keypad 5
#define KEY_KP_6 0x5E // Keypad 6 and Right Arrow
#define KEY_KP_7 0x5F // Keypad 7 and Home
#define KEY_KP_8 0x60 // Keypad 8 and Up Arrow
#define KEY_KP_9 0x61 // Keypad 9 and PageUp
#define KEY_KP_0 0x62 // Keypad 0 and Insert
#define KEY_KP_DOT 0x63 // Keypad . and Delete
#define KEY_ISO_1 0x64 // Keyboard Non-US \ and |
#define KEY_APPLICATION 0x65 // Keyboard Application
#define KEY_POWER 0x66 // Keyboard Power
#define KEY_KP_EQUAL 0x67 // Keypad =
#define KEY_F13 0x68 // Keyboard F13
#define KEY_F14 0x69 // Keyboard F14
#define KEY_F15 0x6A // Keyboard F15
#define KEY_F16 0x6B // Keyboard F16
#define KEY_F17 0x6C // Keyboard F17
#define KEY_F18 0x6D // Keyboard F18
#define KEY_F19 0x6E // Keyboard F19
#define KEY_F20 0x6F // Keyboard F20
#define KEY_F21 0x70 // Keyboard F21
#define KEY_F22 0x71 // Keyboard F22
#define KEY_F23 0x72 // Keyboard F23
#define KEY_F24 0x73 // Keyboard F24
#define KEY_EXEC 0x74 // Keyboard Execute
#define KEY_HELP 0x75 // Keyboard Help
#define KEY_MENU 0x76 // Keyboard Menu
#define KEY_SELECT 0x77 // Keyboard Select
#define KEY_STOP 0x78 // Keyboard Stop
#define KEY_AGAIN 0x79 // Keyboard Again
#define KEY_UNDO 0x7A // Keyboard Undo
#define KEY_CUT 0x7B // Keyboard Cut
#define KEY_COPY 0x7C // Keyboard Copy
#define KEY_PASTE 0x7D // Keyboard Paste
#define KEY_FIND 0x7E // Keyboard Find
#define KEY_MUT 0x7F // Keyboard Mute
#define KEY_VOLUME_UP 0x80 // Keyboard Volume Up
#define KEY_VOLUME_DOWN 0x81 // Keyboard Volume Down
#define KEY_LOCKING_CAPSLOCK 0x82 // Keyboard Locking Caps Lock
#define KEY_LOCKING_NUMLOCK 0x83 // Keyboard Locking Num Lock
#define KEY_LOCKING_SCROLLLOCK 0x84 // Keyboard Locking Scroll Lock
#define KEY_KP_COMMA 0x85 // Keypad Comma
#define KEY_KP_EQUAL_SIGN 0x86 // Keypad Equal Sign
#define KEY_INTERNATIONAL_1 0x87 // Keyboard International1
#define KEY_INTERNATIONAL_2 0x88 // Keyboard International2
#define KEY_INTERNATIONAL_3 0x89 // Keyboard International3
#define KEY_INTERNATIONAL_4 0x8A // Keyboard International4
#define KEY_INTERNATIONAL_5 0x8B // Keyboard International5
#define KEY_INTERNATIONAL_6 0x8C // Keyboard International6
#define KEY_INTERNATIONAL_7 0x8D // Keyboard International7
#define KEY_INTERNATIONAL_8 0x8E // Keyboard International8
#define KEY_INTERNATIONAL_9 0x8F // Keyboard International9
#define KEY_LANG1 0x90 // Keyboard LANG1
#define KEY_LANG2 0x91 // Keyboard LANG2
#define KEY_LANG3 0x92 // Keyboard LANG3
#define KEY_LANG4 0x93 // Keyboard LANG4
#define KEY_LANG5 0x94 // Keyboard LANG5
#define KEY_LANG6 0x95 // Keyboard LANG6
#define KEY_LANG7 0x96 // Keyboard LANG7
#define KEY_LANG8 0x97 // Keyboard LANG8
#define KEY_LANG9 0x98 // Keyboard LANG9
#define KEY_ALTERNATE_ERASE 0x99 // Keyboard Alternate Erase
#define KEY_SYSREQATTENTION 0x9A // Keyboard SysReq/Attention
#define KEY_CANCEL 0x9B // Keyboard Cancel
#define KEY_CLEAR 0x9C // Keyboard Clear
#define KEY_PRIOR 0x9D // Keyboard Prior
#define KEY_RETURN 0x9E // Keyboard Return
#define KEY_SEPARATOR 0x9F // Keyboard Separator
#define KEY_OUT 0xA0 // Keyboard Out
#define KEY_OPER 0xA1 // Keyboard Oper
#define KEY_CLEARAGAIN 0xA2 // Keyboard Clear/Again
#define KEY_CRSELPROPS 0xA3 // Keyboard CrSel/Props
#define KEY_EXSEL 0xA4 // Keyboard ExSel
/* 0xA5 - 0xAF are reserved */
#define KEY_FN1 0xA5
#define KEY_FN2 0xA6
#define KEY_FN3 0xA7
#define KEY_SYS_POWER 0xA8
#define KEY_SYS_SLEEP 0xA9
#define KEY_SYS_WAKE 0xAA
#define KEY_AUX1 0xAB
#define KEY_AUX2 0xAC
#define KEY_AUX3 0xAD
#define KEY_AUX4 0xAE
#define KEY_AUX5 0xAF
#define KEY_KP_ZZ 0xB0 // Keypad 00
#define KEY_KP_ZZZ 0xB1 // Keypad 000
#define KEY_KP_THOUSANDS_SEPARATOR 0xB2 // Keypad thousands separator
#define KEY_KP_DECIMAL_SEPARATOR 0xB3 // Keypad decimal separator
#define KEY_KP_CURRENCY 0xB4 // Keypad currency unit
#define KEY_KP_SUB 0xB5 // Keypad sub-unit
#define KEY_KP_LEFT_PARENTHESIS 0xB6 // Keypad (
#define KEY_KP_RIGHT_PARENTHESIS 0xB7 // Keypad )
#define KEY_KP_LEFT_CURLY 0xB8 // Keypad {
#define KEY_KP_RIGHT_CURLY 0xB9 // Keypad }
#define KEY_KP_TAB 0xBA // Keypad tab
#define KEY_KP_BACKSPACE 0xBB // Keypad backspace
#define KEY_KP_A 0xBC // Keypad A
#define KEY_KP_B 0xBD // Keypad B
#define KEY_KP_C 0xBE // Keypad C
#define KEY_KP_D 0xBF // Keypad D
#define KEY_KP_E 0xC0 // Keypad E
#define KEY_KP_F 0xC1 // Keypad F
#define KEY_KP_XOR 0xC2 // Keypad XOR
#define KEY_KP_CARET 0xC3 // Keypad ^
#define KEY_KP_PERCENT 0xC4 // Keypad %
#define KEY_KP_LESSTHAN 0xC5 // Keypad <
#define KEY_KP_GREATERTHAN 0xC6 // Keypad >
#define KEY_KP_AMPERSAND 0xC7 // Keypad &
#define KEY_KP_AND 0xC8 // Keypad &&
#define KEY_KP_VERTICALBAR 0xC9 // Keypad |
#define KEY_KP_OR 0xCA // Keypad ||
#define KEY_KP_COLON 0xCB // Keypad :
#define KEY_KP_HASH 0xCC // Keypad #
#define KEY_KP_SPACE 0xCD // Keypad Space
#define KEY_KP_AT 0xCE // Keypad @
#define KEY_KP_NOT 0xCF // Keypad !
#define KEY_KP_MEM_STORE 0xD0 // Keypad memory store
#define KEY_KP_MEM_RECALL 0xD1 // Keypad memory recall
#define KEY_KP_MEM_CLEAR 0xD2 // Keypad memory clear
#define KEY_KP_MEM_ADD 0xD3 // Keypad memory add
#define KEY_KP_MEM_SUBTRACT 0xD4 // Keypad memory subtract
#define KEY_KP_MEM_MULTIPLY 0xD5 // Keypad memory multiply
#define KEY_KP_MEM_DIVIDE 0xD6 // Keypad memory divide
#define KEY_KP_PLUSORMINUS 0xD7 // Keypad +/-
#define KEY_KP_CLEAR 0xD8 // Keypad clear
#define KEY_KP_CLEAR_ENTRY 0xD9 // Keypad clear entry
#define KEY_KP_BINARY 0xDA // Keypad binary
#define KEY_KP_OCTAL 0xDB // Keypad octal
#define KEY_KP_DECIMAL 0xDC // Keypad decimal
#define KEY_KP_HEXADECIMAL 0xDD // Keypad hexadecimal
/* Reserved
#define KEY_KP_ 0xDE
#define KEY_KP_ 0xDE
*/
#define KEY_LEFTCONTROL 0xE0 // Keyboard LeftControl
#define KEY_LEFTSHIFT 0xE1 // Keyboard LeftShift
#define KEY_LEFTALT 0xE2 // Keyboard LeftAlt
#define KEY_LEFTGUI 0xE3 // Keyboard Left GUI
#define KEY_RIGHTCONTROL 0xE4 // Keyboard RightControl
#define KEY_RIGHTSHIFT 0xE5 // Keyboard RightShift
#define KEY_RIGHTALT 0xE6 // Keyboard RightAlt
#define KEY_RIGHTGUI 0xE7 // Keyboard Right GUI
#endif /* __USB_scan_codes_h__ */