VirtualBox

source: vbox/trunk/src/VBox/RDP/client-1.8.4/scancodes.h@ 83298

Last change on this file since 83298 was 55121, checked in by vboxsync, 10 years ago

rdesktop 1.8.3 unmodified

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 9.4 KB
Line 
1
2/* Two defines for every scancode:
3 One called SCANCODE_KEY_<num>, where <num> is the key location number.
4 One called SCANCODE_CHAR_<char-on-us-kbd>, where <char-on-us-kbd> is the
5 unshifted character on a US 101/102 keyboard. See the Microsoft
6 document "Keyboard Scan Code Specification" for more information.
7
8 Up keys normally have scancode values +0x80.
9
10 0x0: Avoid
11 0x1- 0x59: Normal
12 0x60, 0x61: Avoid, since the up key would be 0xe1, 0xe1
13 0x61 - 0x79: Normal
14 0xfa - : keyboard drivers interpret these as responses from the 8042 chip
15
16 We use bit 7 to indicate 0xe0 prefix instead of two-byte sequence (0xe0, something). Eq.,
17 0xe 0x38 is defined as (0x80 | 0x38)
18*/
19
20/* FIXME:
21 Special keys like Numeric / are very complicated and emits many scancodes.
22*/
23
24#define SCANCODE_EXTENDED 0x80
25
26#define SCANCODE_KEY_1 0x29
27#define SCANCODE_CHAR_GRAVE 0x29
28
29#define SCANCODE_KEY_2 0x2
30#define SCANCODE_CHAR_1 SCANCODE_KEY_2
31
32#define SCANCODE_KEY_3 0x3
33#define SCANCODE_CHAR_2 SCANCODE_KEY_3
34
35#define SCANCODE_KEY_4 0x4
36#define SCANCODE_CHAR_3 SCANCODE_KEY_4
37
38#define SCANCODE_KEY_5 0x5
39#define SCANCODE_CHAR_4 SCANCODE_KEY_5
40
41#define SCANCODE_KEY_6 0x6
42#define SCANCODE_CHAR_5 SCANCODE_KEY_6
43
44#define SCANCODE_KEY_7 0x7
45#define SCANCODE_CHAR_6 SCANCODE_KEY_7
46
47#define SCANCODE_KEY_8 0x8
48#define SCANCODE_CHAR_7 SCANCODE_KEY_8
49
50#define SCANCODE_KEY_9 0x9
51#define SCANCODE_CHAR_8 SCANCODE_KEY_9
52
53#define SCANCODE_KEY_10 0xa
54#define SCANCODE_CHAR_9 SCANCODE_KEY_10
55
56#define SCANCODE_KEY_11 0xb
57#define SCANCODE_CHAR_0 SCANCODE_KEY_11
58
59#define SCANCODE_KEY_12 0xc
60#define SCANCODE_CHAR_MINUS SCANCODE_KEY_12
61
62#define SCANCODE_KEY_13 0xd
63#define SCANCODE_CHAR_EQUAL SCANCODE_KEY_13
64
65/* Key 14 does not exist */
66
67#define SCANCODE_KEY_15 0xe
68#define SCANCODE_CHAR_BACKSPACE SCANCODE_KEY_15
69
70#define SCANCODE_KEY_16 0xf
71#define SCANCODE_CHAR_TAB SCANCODE_KEY_16
72
73#define SCANCODE_KEY_17 0x10
74#define SCANCODE_CHAR_Q SCANCODE_KEY_17
75
76#define SCANCODE_KEY_18 0x11
77#define SCANCODE_CHAR_W SCANCODE_KEY_18
78
79#define SCANCODE_KEY_19 0x12
80#define SCANCODE_CHAR_E SCANCODE_KEY_19
81
82#define SCANCODE_KEY_20 0x13
83#define SCANCODE_CHAR_R SCANCODE_KEY_20
84
85#define SCANCODE_KEY_21 0x14
86#define SCANCODE_CHAR_T SCANCODE_KEY_21
87
88#define SCANCODE_KEY_22 0x15
89#define SCANCODE_CHAR_Y SCANCODE_KEY_22
90
91#define SCANCODE_KEY_23 0x16
92#define SCANCODE_CHAR_U SCANCODE_KEY_23
93
94#define SCANCODE_KEY_24 0x17
95#define SCANCODE_CHAR_I SCANCODE_KEY_24
96
97#define SCANCODE_KEY_25 0x18
98#define SCANCODE_CHAR_O SCANCODE_KEY_25
99
100#define SCANCODE_KEY_26 0x19
101#define SCANCODE_CHAR_P SCANCODE_KEY_26
102
103#define SCANCODE_KEY_27 0x1a
104#define SCANCODE_CHAR_BRACKETLEFT SCANCODE_KEY_27
105
106#define SCANCODE_KEY_28 0x1b
107#define SCANCODE_CHAR_BRACKETRIGHT SCANCODE_KEY_28
108
109/* Only on US keyboard */
110#define SCANCODE_KEY_29 0x2b
111#define SCANCODE_CHAR_BACKSLASH SCANCODE_KEY_29
112
113#define SCANCODE_KEY_30 0x3a
114#define SCANCODE_CHAR_CAPSLOCK SCANCODE_KEY_30
115
116#define SCANCODE_KEY_31 0x1e
117#define SCANCODE_CHAR_A SCANCODE_KEY_31
118
119#define SCANCODE_KEY_32 0x1f
120#define SCANCODE_CHAR_S SCANCODE_KEY_32
121
122#define SCANCODE_KEY_33 0x20
123#define SCANCODE_CHAR_D SCANCODE_KEY_33
124
125#define SCANCODE_KEY_34 0x21
126#define SCANCODE_CHAR_F SCANCODE_KEY_34
127
128#define SCANCODE_KEY_35 0x22
129#define SCANCODE_CHAR_G SCANCODE_KEY_35
130
131#define SCANCODE_KEY_36 0x23
132#define SCANCODE_CHAR_H SCANCODE_KEY_36
133
134#define SCANCODE_KEY_37 0x24
135#define SCANCODE_CHAR_J SCANCODE_KEY_37
136
137#define SCANCODE_KEY_38 0x25
138#define SCANCODE_CHAR_K SCANCODE_KEY_38
139
140#define SCANCODE_KEY_39 0x26
141#define SCANCODE_CHAR_L SCANCODE_KEY_39
142
143#define SCANCODE_KEY_40 0x27
144#define SCANCODE_CHAR_SEMICOLON SCANCODE_KEY_40
145
146#define SCANCODE_KEY_41 0x28
147#define SCANCODE_CHAR_APOSTROPHE SCANCODE_KEY_41
148
149/* Only on international keyboard */
150#define SCANCODE_KEY_42 0x2b
151
152#define SCANCODE_KEY_43 0x1c
153#define SCANCODE_CHAR_ENTER SCANCODE_KEY_43
154
155#define SCANCODE_KEY_44 0x2a
156#define SCANCODE_CHAR_LSHIFT SCANCODE_KEY_44
157
158/* Only on international keyboard */
159#define SCANCODE_KEY_45 0x56
160
161#define SCANCODE_KEY_46 0x2c
162#define SCANCODE_CHAR_Z SCANCODE_KEY_46
163
164#define SCANCODE_KEY_47 0x2d
165#define SCANCODE_CHAR_X SCANCODE_KEY_47
166
167#define SCANCODE_KEY_48 0x2e
168#define SCANCODE_CHAR_C SCANCODE_KEY_48
169
170#define SCANCODE_KEY_49 0x2f
171#define SCANCODE_CHAR_V SCANCODE_KEY_49
172
173#define SCANCODE_KEY_50 0x30
174#define SCANCODE_CHAR_B SCANCODE_KEY_50
175
176#define SCANCODE_KEY_51 0x31
177#define SCANCODE_CHAR_N SCANCODE_KEY_51
178
179#define SCANCODE_KEY_52 0x32
180#define SCANCODE_CHAR_M SCANCODE_KEY_52
181
182#define SCANCODE_KEY_53 0x33
183#define SCANCODE_CHAR_COMMA SCANCODE_KEY_53
184
185#define SCANCODE_KEY_54 0x34
186#define SCANCODE_CHAR_DOT SCANCODE_KEY_54
187
188#define SCANCODE_KEY_55 0x35
189#define SCANCODE_CHAR_SLASH SCANCODE_KEY_55
190
191/* Only on Brazilian and some Far East keyboards */
192#define SCANCODE_KEY_56 0x73
193
194#define SCANCODE_KEY_57 0x36
195#define SCANCODE_CHAR_RSHIFT SCANCODE_KEY_57
196
197#define SCANCODE_KEY_58 0x1d
198#define SCANCODE_CHAR_LCTRL SCANCODE_KEY_58
199
200/* Key 59 does not exist */
201
202#define SCANCODE_KEY_60 0x38
203#define SCANCODE_CHAR_LALT SCANCODE_KEY_60
204
205#define SCANCODE_KEY_61 0x39
206#define SCANCODE_CHAR_SPACE SCANCODE_KEY_61
207
208#define SCANCODE_KEY_62 (SCANCODE_EXTENDED | 0x38)
209#define SCANCODE_CHAR_RALT SCANCODE_KEY_62
210
211/* Key 63 does not exist */
212
213#define SCANCODE_KEY_64 (SCANCODE_EXTENDED | 0x1d)
214#define SCANCODE_CHAR_RCTRL SCANCODE_KEY_64
215
216/* Key 65 - 74 does not exist */
217
218#define SCANCODE_KEY_75 (SCANCODE_EXTENDED | 0x52)
219#define SCANCODE_CHAR_INSERT SCANCODE_KEY_75
220
221#define SCANCODE_KEY_76 (SCANCODE_EXTENDED | 0x53)
222#define SCANCODE_CHAR_DELETE SCANCODE_KEY_76
223
224/* Key 77 - 78 does not exist */
225
226#define SCANCODE_KEY_79 (SCANCODE_EXTENDED | 0x4b)
227#define SCANCODE_CHAR_LARROW SCANCODE_KEY_79
228
229#define SCANCODE_KEY_80 (SCANCODE_EXTENDED | 0x47)
230#define SCANCODE_CHAR_HOME SCANCODE_KEY_80
231
232#define SCANCODE_KEY_81 (SCANCODE_EXTENDED | 0x4f)
233#define SCANCODE_CHAR_END SCANCODE_KEY_81
234
235/* Key 82 does not exist */
236
237#define SCANCODE_KEY_83 (SCANCODE_EXTENDED | 0x48)
238#define SCANCODE_CHAR_UPARROW SCANCODE_KEY_83
239
240#define SCANCODE_KEY_84 (SCANCODE_EXTENDED | 0x50)
241#define SCANCODE_CHAR_DNARROW SCANCODE_KEY_84
242
243#define SCANCODE_KEY_85 (SCANCODE_EXTENDED | 0x49)
244#define SCANCODE_CHAR_PAGEUP SCANCODE_KEY_85
245
246#define SCANCODE_KEY_86 (SCANCODE_EXTENDED | 0x51)
247#define SCANCODE_CHAR_PAGEDOWN SCANCODE_KEY_86
248
249/* Key 87 - 88 does not exist */
250
251#define SCANCODE_KEY_89 (SCANCODE_EXTENDED | 0x4d)
252#define SCANCODE_CHAR_RARROW SCANCODE_KEY_89
253
254#define SCANCODE_KEY_90 0x45
255#define SCANCODE_CHAR_NUMLOCK SCANCODE_KEY_90
256
257#define SCANCODE_KEY_91 0x47
258#define SCANCODE_CHAR_NUMERIC7 SCANCODE_KEY_91
259
260#define SCANCODE_KEY_92 0x4b
261#define SCANCODE_CHAR_NUMERIC4 SCANCODE_KEY_92
262
263#define SCANCODE_KEY_93 0x4f
264#define SCANCODE_CHAR_NUMERIC1 SCANCODE_KEY_93
265
266/* Key 94 does not exist */
267
268#define SCANCODE_KEY_95 (SCANCODE_EXTENDED | 0x35)
269#define SCANCODE_CHAR_NUMERICSLASH SCANCODE_KEY_95
270
271#define SCANCODE_KEY_96 0x48
272#define SCANCODE_CHAR_NUMERIC8 SCANCODE_KEY_96
273
274#define SCANCODE_KEY_97 0x4c
275#define SCANCODE_CHAR_NUMERIC5 SCANCODE_KEY_97
276
277#define SCANCODE_KEY_98 0x50
278#define SCANCODE_CHAR_NUMERIC2 SCANCODE_KEY_98
279
280#define SCANCODE_KEY_99 0x52
281#define SCANCODE_CHAR_NUMERIC0 SCANCODE_KEY_99
282
283#define SCANCODE_KEY_100 0x37
284#define SCANCODE_CHAR_NUMERICSTAR SCANCODE_KEY_100
285
286#define SCANCODE_KEY_101 0x49
287#define SCANCODE_CHAR_NUMERIC9 SCANCODE_KEY_101
288
289#define SCANCODE_KEY_102 0x4d
290#define SCANCODE_CHAR_NUMERIC6 SCANCODE_KEY_102
291
292#define SCANCODE_KEY_103 0x51
293#define SCANCODE_CHAR_NUMERIC3 SCANCODE_KEY_103
294
295#define SCANCODE_KEY_104 0x53
296#define SCANCODE_CHAR_NUMERICDOT SCANCODE_KEY_104
297
298#define SCANCODE_KEY_105 0x4a
299#define SCANCODE_CHAR_NUMERICMINUS SCANCODE_KEY_105
300
301#define SCANCODE_KEY_106 0x4e
302#define SCANCODE_CHAR_NUMERICPLUS SCANCODE_KEY_106
303
304/* Only on Brazilian and some Far East keyboards */
305#define SCANCODE_KEY_107 0x
306
307#define SCANCODE_KEY_108 (SCANCODE_EXTENDED | 0x1c)
308#define SCANCODE_CHAR_NUMERICENTER SCANCODE_KEY_108
309
310/* Key 109 does not exist */
311
312#define SCANCODE_KEY_110 0x1
313#define SCANCODE_CHAR_ESC SCANCODE_KEY_110
314
315/* Key 111 does not exist */
316
317#define SCANCODE_KEY_112 0x3b
318#define SCANCODE_CHAR_F1 SCANCODE_KEY_112
319
320#define SCANCODE_KEY_113 0x3c
321#define SCANCODE_CHAR_F2 SCANCODE_KEY_113
322
323#define SCANCODE_KEY_114 0x3d
324#define SCANCODE_CHAR_F3 SCANCODE_KEY_114
325
326#define SCANCODE_KEY_115 0x3e
327#define SCANCODE_CHAR_F4 SCANCODE_KEY_115
328
329#define SCANCODE_KEY_116 0x3f
330#define SCANCODE_CHAR_F5 SCANCODE_KEY_116
331
332#define SCANCODE_KEY_117 0x40
333#define SCANCODE_CHAR_F6 SCANCODE_KEY_117
334
335#define SCANCODE_KEY_118 0x41
336#define SCANCODE_CHAR_F7 SCANCODE_KEY_118
337
338#define SCANCODE_KEY_119 0x42
339#define SCANCODE_CHAR_F8 SCANCODE_KEY_119
340
341#define SCANCODE_KEY_120 0x43
342#define SCANCODE_CHAR_F9 SCANCODE_KEY_120
343
344#define SCANCODE_KEY_121 0x44
345#define SCANCODE_CHAR_F10 SCANCODE_KEY_121
346
347#define SCANCODE_KEY_122 0x57
348#define SCANCODE_CHAR_F11 SCANCODE_KEY_122
349
350#define SCANCODE_KEY_123 0x58
351#define SCANCODE_CHAR_F12 SCANCODE_KEY_123
352
353/* Key 124: The Print Screen sequence is complicated, and
354 hardcoded in xkeymap.c */
355
356#define SCANCODE_KEY_125 0x46
357#define SCANCODE_CHAR_SCROLLLOCK SCANCODE_KEY_125
358
359/* Key 126: The Pause and Break sequences is complicated, and
360 hardcoded in xkeymap.c */
361
362/*
363 The keys below does not have any key location number
364*/
365
366#define SCANCODE_CHAR_LWIN (SCANCODE_EXTENDED | 0x5b)
367
368#define SCANCODE_CHAR_RWIN (SCANCODE_EXTENDED | 0x5c)
369
370#define SCANCODE_CHAR_APPLICATION (SCANCODE_EXTENDED | 0x5d)
371
372#define SCANCODE_CHAR_ACPIPOWER (SCANCODE_EXTENDED | 0x5e)
373
374#define SCANCODE_CHAR_ACPISLEEP (SCANCODE_EXTENDED | 0x5f)
375
376#define SCANCODE_CHAR_ACPIWAKE (SCANCODE_EXTENDED | 0x63)
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette