~ubuntu-branches/ubuntu/vivid/freerdp/vivid

« back to all changes in this revision

Viewing changes to winpr/include/winpr/input.h

  • Committer: Package Import Robot
  • Author(s): Iain Lane
  • Date: 2014-11-11 12:20:50 UTC
  • mfrom: (1.2.5)
  • mto: This revision was merged to the branch mainline in revision 24.
  • Revision ID: package-import@ubuntu.com-20141111122050-7z628f4ab38qxad5
Tags: upstream-1.1.0~git20140921.1.440916e+dfsg1
ImportĀ upstreamĀ versionĀ 1.1.0~git20140921.1.440916e+dfsg1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/**
 
2
 * WinPR: Windows Portable Runtime
 
3
 * Input Functions
 
4
 *
 
5
 * Copyright 2012 Marc-Andre Moreau <marcandre.moreau@gmail.com>
 
6
 *
 
7
 * Licensed under the Apache License, Version 2.0 (the "License");
 
8
 * you may not use this file except in compliance with the License.
 
9
 * You may obtain a copy of the License at
 
10
 *
 
11
 *     http://www.apache.org/licenses/LICENSE-2.0
 
12
 *
 
13
 * Unless required by applicable law or agreed to in writing, software
 
14
 * distributed under the License is distributed on an "AS IS" BASIS,
 
15
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 
16
 * See the License for the specific language governing permissions and
 
17
 * limitations under the License.
 
18
 */
 
19
 
 
20
#ifndef WINPR_INPUT_H
 
21
#define WINPR_INPUT_H
 
22
 
 
23
 
 
24
#include <winpr/winpr.h>
 
25
#include <winpr/wtypes.h>
 
26
 
 
27
/**
 
28
 * Key Flags
 
29
 */
 
30
 
 
31
#define KBDEXT          (USHORT) 0x0100
 
32
#define KBDMULTIVK      (USHORT) 0x0200
 
33
#define KBDSPECIAL      (USHORT) 0x0400
 
34
#define KBDNUMPAD       (USHORT) 0x0800
 
35
#define KBDUNICODE      (USHORT) 0x1000
 
36
#define KBDINJECTEDVK   (USHORT) 0x2000
 
37
#define KBDMAPPEDVK     (USHORT) 0x4000
 
38
#define KBDBREAK        (USHORT) 0x8000
 
39
 
 
40
/*
 
41
 * Virtual Key Codes (Windows):
 
42
 * http://msdn.microsoft.com/en-us/library/windows/desktop/dd375731/
 
43
 * http://msdn.microsoft.com/en-us/library/ms927178.aspx
 
44
 */
 
45
 
 
46
/* Mouse buttons */
 
47
 
 
48
#define VK_LBUTTON      0x01 /* Left mouse button */
 
49
#define VK_RBUTTON      0x02 /* Right mouse button */
 
50
#define VK_CANCEL       0x03 /* Control-break processing */
 
51
#define VK_MBUTTON      0x04 /* Middle mouse button (three-button mouse) */
 
52
#define VK_XBUTTON1     0x05 /* Windows 2000/XP: X1 mouse button */
 
53
#define VK_XBUTTON2     0x06 /* Windows 2000/XP: X2 mouse button */
 
54
 
 
55
/* 0x07 is undefined */
 
56
 
 
57
#define VK_BACK         0x08 /* BACKSPACE key */
 
58
#define VK_TAB          0x09 /* TAB key */
 
59
 
 
60
/* 0x0A to 0x0B are reserved */
 
61
 
 
62
#define VK_CLEAR        0x0C /* CLEAR key */
 
63
#define VK_RETURN       0x0D /* ENTER key */
 
64
 
 
65
/* 0x0E to 0x0F are undefined */
 
66
 
 
67
#define VK_SHIFT        0x10 /* SHIFT key */
 
68
#define VK_CONTROL      0x11 /* CTRL key */
 
69
#define VK_MENU         0x12 /* ALT key */
 
70
#define VK_PAUSE        0x13 /* PAUSE key */
 
71
#define VK_CAPITAL      0x14 /* CAPS LOCK key */
 
72
#define VK_KANA         0x15 /* Input Method Editor (IME) Kana mode */
 
73
#define VK_HANGUEL      0x15 /* IME Hanguel mode (maintained for compatibility; use #define VK_HANGUL) */
 
74
#define VK_HANGUL       0x15 /* IME Hangul mode */
 
75
 
 
76
/* 0x16 is undefined */
 
77
 
 
78
#define VK_JUNJA        0x17 /* IME Junja mode */
 
79
#define VK_FINAL        0x18 /* IME final mode */
 
80
#define VK_HANJA        0x19 /* IME Hanja mode */
 
81
#define VK_KANJI        0x19 /* IME Kanji mode */
 
82
 
 
83
/* 0x1A is undefined */
 
84
 
 
85
#define VK_ESCAPE       0x1B /* ESC key */
 
86
#define VK_CONVERT      0x1C /* IME convert */
 
87
#define VK_NONCONVERT   0x1D /* IME nonconvert */
 
88
#define VK_ACCEPT       0x1E /* IME accept */
 
89
#define VK_MODECHANGE   0x1F /* IME mode change request */
 
90
 
 
91
#define VK_SPACE        0x20 /* SPACEBAR */
 
92
#define VK_PRIOR        0x21 /* PAGE UP key */
 
93
#define VK_NEXT         0x22 /* PAGE DOWN key */
 
94
#define VK_END          0x23 /* END key */
 
95
#define VK_HOME         0x24 /* HOME key */
 
96
#define VK_LEFT         0x25 /* LEFT ARROW key */
 
97
#define VK_UP           0x26 /* UP ARROW key */
 
98
#define VK_RIGHT        0x27 /* RIGHT ARROW key */
 
99
#define VK_DOWN         0x28 /* DOWN ARROW key */
 
100
#define VK_SELECT       0x29 /* SELECT key */
 
101
#define VK_PRINT        0x2A /* PRINT key */
 
102
#define VK_EXECUTE      0x2B /* EXECUTE key */
 
103
#define VK_SNAPSHOT     0x2C /* PRINT SCREEN key */
 
104
#define VK_INSERT       0x2D /* INS key */
 
105
#define VK_DELETE       0x2E /* DEL key */
 
106
#define VK_HELP         0x2F /* HELP key */
 
107
 
 
108
/* Digits, the last 4 bits of the code represent the corresponding digit */
 
109
 
 
110
#define VK_KEY_0        0x30 /* '0' key */
 
111
#define VK_KEY_1        0x31 /* '1' key */
 
112
#define VK_KEY_2        0x32 /* '2' key */
 
113
#define VK_KEY_3        0x33 /* '3' key */
 
114
#define VK_KEY_4        0x34 /* '4' key */
 
115
#define VK_KEY_5        0x35 /* '5' key */
 
116
#define VK_KEY_6        0x36 /* '6' key */
 
117
#define VK_KEY_7        0x37 /* '7' key */
 
118
#define VK_KEY_8        0x38 /* '8' key */
 
119
#define VK_KEY_9        0x39 /* '9' key */
 
120
 
 
121
/* 0x3A to 0x40 are undefined */
 
122
 
 
123
/* The alphabet, the code corresponds to the capitalized letter in the ASCII code */
 
124
 
 
125
#define VK_KEY_A        0x41 /* 'A' key */
 
126
#define VK_KEY_B        0x42 /* 'B' key */
 
127
#define VK_KEY_C        0x43 /* 'C' key */
 
128
#define VK_KEY_D        0x44 /* 'D' key */
 
129
#define VK_KEY_E        0x45 /* 'E' key */
 
130
#define VK_KEY_F        0x46 /* 'F' key */
 
131
#define VK_KEY_G        0x47 /* 'G' key */
 
132
#define VK_KEY_H        0x48 /* 'H' key */
 
133
#define VK_KEY_I        0x49 /* 'I' key */
 
134
#define VK_KEY_J        0x4A /* 'J' key */
 
135
#define VK_KEY_K        0x4B /* 'K' key */
 
136
#define VK_KEY_L        0x4C /* 'L' key */
 
137
#define VK_KEY_M        0x4D /* 'M' key */
 
138
#define VK_KEY_N        0x4E /* 'N' key */
 
139
#define VK_KEY_O        0x4F /* 'O' key */
 
140
#define VK_KEY_P        0x50 /* 'P' key */
 
141
#define VK_KEY_Q        0x51 /* 'Q' key */
 
142
#define VK_KEY_R        0x52 /* 'R' key */
 
143
#define VK_KEY_S        0x53 /* 'S' key */
 
144
#define VK_KEY_T        0x54 /* 'T' key */
 
145
#define VK_KEY_U        0x55 /* 'U' key */
 
146
#define VK_KEY_V        0x56 /* 'V' key */
 
147
#define VK_KEY_W        0x57 /* 'W' key */
 
148
#define VK_KEY_X        0x58 /* 'X' key */
 
149
#define VK_KEY_Y        0x59 /* 'Y' key */
 
150
#define VK_KEY_Z        0x5A /* 'Z' key */
 
151
 
 
152
#define VK_LWIN         0x5B /* Left Windows key (Microsoft Natural keyboard) */
 
153
#define VK_RWIN         0x5C /* Right Windows key (Natural keyboard) */
 
154
#define VK_APPS         0x5D /* Applications key (Natural keyboard) */
 
155
 
 
156
/* 0x5E is reserved */
 
157
 
 
158
#define VK_POWER        0x5E /* Power key */
 
159
 
 
160
#define VK_SLEEP        0x5F /* Computer Sleep key */
 
161
 
 
162
/* Numeric keypad digits, the last four bits of the code represent the corresponding digit */
 
163
 
 
164
#define VK_NUMPAD0      0x60 /* Numeric keypad '0' key */
 
165
#define VK_NUMPAD1      0x61 /* Numeric keypad '1' key */
 
166
#define VK_NUMPAD2      0x62 /* Numeric keypad '2' key */
 
167
#define VK_NUMPAD3      0x63 /* Numeric keypad '3' key */
 
168
#define VK_NUMPAD4      0x64 /* Numeric keypad '4' key */
 
169
#define VK_NUMPAD5      0x65 /* Numeric keypad '5' key */
 
170
#define VK_NUMPAD6      0x66 /* Numeric keypad '6' key */
 
171
#define VK_NUMPAD7      0x67 /* Numeric keypad '7' key */
 
172
#define VK_NUMPAD8      0x68 /* Numeric keypad '8' key */
 
173
#define VK_NUMPAD9      0x69 /* Numeric keypad '9' key */
 
174
 
 
175
/* Numeric keypad operators and special keys */
 
176
 
 
177
#define VK_MULTIPLY     0x6A /* Multiply key */
 
178
#define VK_ADD          0x6B /* Add key */
 
179
#define VK_SEPARATOR    0x6C /* Separator key */
 
180
#define VK_SUBTRACT     0x6D /* Subtract key */
 
181
#define VK_DECIMAL      0x6E /* Decimal key */
 
182
#define VK_DIVIDE       0x6F /* Divide key */
 
183
 
 
184
/* Function keys, from F1 to F24 */
 
185
 
 
186
#define VK_F1           0x70 /* F1 key */
 
187
#define VK_F2           0x71 /* F2 key */
 
188
#define VK_F3           0x72 /* F3 key */
 
189
#define VK_F4           0x73 /* F4 key */
 
190
#define VK_F5           0x74 /* F5 key */
 
191
#define VK_F6           0x75 /* F6 key */
 
192
#define VK_F7           0x76 /* F7 key */
 
193
#define VK_F8           0x77 /* F8 key */
 
194
#define VK_F9           0x78 /* F9 key */
 
195
#define VK_F10          0x79 /* F10 key */
 
196
#define VK_F11          0x7A /* F11 key */
 
197
#define VK_F12          0x7B /* F12 key */
 
198
#define VK_F13          0x7C /* F13 key */
 
199
#define VK_F14          0x7D /* F14 key */
 
200
#define VK_F15          0x7E /* F15 key */
 
201
#define VK_F16          0x7F /* F16 key */
 
202
#define VK_F17          0x80 /* F17 key */
 
203
#define VK_F18          0x81 /* F18 key */
 
204
#define VK_F19          0x82 /* F19 key */
 
205
#define VK_F20          0x83 /* F20 key */
 
206
#define VK_F21          0x84 /* F21 key */
 
207
#define VK_F22          0x85 /* F22 key */
 
208
#define VK_F23          0x86 /* F23 key */
 
209
#define VK_F24          0x87 /* F24 key */
 
210
 
 
211
/* 0x88 to 0x8F are unassigned */
 
212
 
 
213
#define VK_NUMLOCK      0x90 /* NUM LOCK key */
 
214
#define VK_SCROLL       0x91 /* SCROLL LOCK key */
 
215
 
 
216
/* 0x92 to 0x96 are OEM specific */
 
217
/* 0x97 to 0x9F are unassigned */
 
218
 
 
219
/* Modifier keys */
 
220
 
 
221
#define VK_LSHIFT       0xA0 /* Left SHIFT key */
 
222
#define VK_RSHIFT       0xA1 /* Right SHIFT key */
 
223
#define VK_LCONTROL     0xA2 /* Left CONTROL key */
 
224
#define VK_RCONTROL     0xA3 /* Right CONTROL key */
 
225
#define VK_LMENU        0xA4 /* Left MENU key */
 
226
#define VK_RMENU        0xA5 /* Right MENU key */
 
227
 
 
228
/* Browser related keys */
 
229
 
 
230
#define VK_BROWSER_BACK         0xA6 /* Windows 2000/XP: Browser Back key */
 
231
#define VK_BROWSER_FORWARD      0xA7 /* Windows 2000/XP: Browser Forward key */
 
232
#define VK_BROWSER_REFRESH      0xA8 /* Windows 2000/XP: Browser Refresh key */
 
233
#define VK_BROWSER_STOP         0xA9 /* Windows 2000/XP: Browser Stop key */
 
234
#define VK_BROWSER_SEARCH       0xAA /* Windows 2000/XP: Browser Search key */
 
235
#define VK_BROWSER_FAVORITES    0xAB /* Windows 2000/XP: Browser Favorites key */
 
236
#define VK_BROWSER_HOME         0xAC /* Windows 2000/XP: Browser Start and Home key */
 
237
 
 
238
/* Volume related keys */
 
239
 
 
240
#define VK_VOLUME_MUTE          0xAD /* Windows 2000/XP: Volume Mute key */
 
241
#define VK_VOLUME_DOWN          0xAE /* Windows 2000/XP: Volume Down key */
 
242
#define VK_VOLUME_UP            0xAF /* Windows 2000/XP: Volume Up key */
 
243
 
 
244
/* Media player related keys */
 
245
 
 
246
#define VK_MEDIA_NEXT_TRACK     0xB0 /* Windows 2000/XP: Next Track key */
 
247
#define VK_MEDIA_PREV_TRACK     0xB1 /* Windows 2000/XP: Previous Track key */
 
248
#define VK_MEDIA_STOP           0xB2 /* Windows 2000/XP: Stop Media key */
 
249
#define VK_MEDIA_PLAY_PAUSE     0xB3 /* Windows 2000/XP: Play/Pause Media key */
 
250
 
 
251
/* Application launcher keys */
 
252
 
 
253
#define VK_LAUNCH_MAIL          0xB4 /* Windows 2000/XP: Start Mail key */
 
254
#define VK_MEDIA_SELECT         0xB5 /* Windows 2000/XP: Select Media key */
 
255
#define VK_LAUNCH_MEDIA_SELECT  0xB5 /* Windows 2000/XP: Select Media key */
 
256
#define VK_LAUNCH_APP1          0xB6 /* Windows 2000/XP: Start Application 1 key */
 
257
#define VK_LAUNCH_APP2          0xB7 /* Windows 2000/XP: Start Application 2 key */
 
258
 
 
259
/* 0xB8 and 0xB9 are reserved */
 
260
 
 
261
/* OEM keys */
 
262
 
 
263
#define VK_OEM_1        0xBA /* Used for miscellaneous characters; it can vary by keyboard. */
 
264
                             /* Windows 2000/XP: For the US standard keyboard, the ';:' key */
 
265
 
 
266
#define VK_OEM_PLUS     0xBB /* Windows 2000/XP: For any country/region, the '+' key */
 
267
#define VK_OEM_COMMA    0xBC /* Windows 2000/XP: For any country/region, the ',' key */
 
268
#define VK_OEM_MINUS    0xBD /* Windows 2000/XP: For any country/region, the '-' key */
 
269
#define VK_OEM_PERIOD   0xBE /* Windows 2000/XP: For any country/region, the '.' key */
 
270
 
 
271
#define VK_OEM_2        0xBF /* Used for miscellaneous characters; it can vary by keyboard. */
 
272
                             /* Windows 2000/XP: For the US standard keyboard, the '/?' key */
 
273
 
 
274
#define VK_OEM_3        0xC0 /* Used for miscellaneous characters; it can vary by keyboard. */
 
275
                             /* Windows 2000/XP: For the US standard keyboard, the '`~' key */
 
276
 
 
277
/* 0xC1 to 0xD7 are reserved */
 
278
#define VK_ABNT_C1      0xC1 /* Brazilian (ABNT) Keyboard */
 
279
#define VK_ABNT_C2      0xC2 /* Brazilian (ABNT) Keyboard */
 
280
 
 
281
/* 0xD8 to 0xDA are unassigned */
 
282
 
 
283
#define VK_OEM_4        0xDB /* Used for miscellaneous characters; it can vary by keyboard. */
 
284
                             /* Windows 2000/XP: For the US standard keyboard, the '[{' key */
 
285
 
 
286
#define VK_OEM_5        0xDC /* Used for miscellaneous characters; it can vary by keyboard. */
 
287
                             /* Windows 2000/XP: For the US standard keyboard, the '\|' key */
 
288
 
 
289
#define VK_OEM_6        0xDD /* Used for miscellaneous characters; it can vary by keyboard. */
 
290
                             /* Windows 2000/XP: For the US standard keyboard, the ']}' key */
 
291
 
 
292
#define VK_OEM_7        0xDE /* Used for miscellaneous characters; it can vary by keyboard. */
 
293
                             /* Windows 2000/XP: For the US standard keyboard, the 'single-quote/double-quote' key */
 
294
 
 
295
#define VK_OEM_8        0xDF /* Used for miscellaneous characters; it can vary by keyboard. */
 
296
 
 
297
/* 0xE0 is reserved */
 
298
 
 
299
#define VK_OEM_AX       0xE1 /* AX key on Japanese AX keyboard */
 
300
 
 
301
#define VK_OEM_102      0xE2 /* Windows 2000/XP: Either the angle bracket key or */
 
302
                             /* the backslash key on the RT 102-key keyboard */
 
303
 
 
304
/* 0xE3 and 0xE4 are OEM specific */
 
305
 
 
306
#define VK_PROCESSKEY   0xE5 /* Windows 95/98/Me, Windows NT 4.0, Windows 2000/XP: IME PROCESS key */
 
307
 
 
308
/* 0xE6 is OEM specific */
 
309
 
 
310
#define VK_PACKET       0xE7    /* Windows 2000/XP: Used to pass Unicode characters as if they were keystrokes. */
 
311
                                /* The #define VK_PACKET key is the low word of a 32-bit Virtual Key value used */
 
312
                                /* for non-keyboard input methods. For more information, */
 
313
                                /* see Remark in KEYBDINPUT, SendInput, WM_KEYDOWN, and WM_KEYUP */
 
314
 
 
315
/* 0xE8 is unassigned */
 
316
/* 0xE9 to 0xF5 are OEM specific */
 
317
 
 
318
#define VK_OEM_RESET                    0xE9
 
319
#define VK_OEM_JUMP                     0xEA
 
320
#define VK_OEM_PA1                      0xEB
 
321
#define VK_OEM_PA2                      0xEC
 
322
#define VK_OEM_PA3                      0xED
 
323
#define VK_OEM_WSCTRL                   0xEE
 
324
#define VK_OEM_CUSEL                    0xEF
 
325
#define VK_OEM_ATTN                     0xF0
 
326
#define VK_OEM_FINISH                   0xF1
 
327
#define VK_OEM_COPY                     0xF2
 
328
#define VK_OEM_AUTO                     0xF3
 
329
#define VK_OEM_ENLW                     0xF4
 
330
#define VK_OEM_BACKTAB                  0xF5
 
331
 
 
332
#define VK_ATTN                         0xF6 /* Attn key */
 
333
#define VK_CRSEL                        0xF7 /* CrSel key */
 
334
#define VK_EXSEL                        0xF8 /* ExSel key */
 
335
#define VK_EREOF                        0xF9 /* Erase EOF key */
 
336
#define VK_PLAY                         0xFA /* Play key */
 
337
#define VK_ZOOM                         0xFB /* Zoom key */
 
338
#define VK_NONAME                       0xFC /* Reserved */
 
339
#define VK_PA1                          0xFD /* PA1 key */
 
340
#define VK_OEM_CLEAR                    0xFE /* Clear key */
 
341
 
 
342
#define VK_NONE                         0xFF /* no key */
 
343
 
 
344
/**
 
345
 * For East Asian Input Method Editors (IMEs)
 
346
 * the following additional virtual keyboard definitions must be observed.
 
347
 */
 
348
 
 
349
#define VK_DBE_ALPHANUMERIC             0xF0 /* Changes the mode to alphanumeric. */
 
350
#define VK_DBE_KATAKANA                 0xF1 /* Changes the mode to Katakana. */
 
351
#define VK_DBE_HIRAGANA                 0xF2 /* Changes the mode to Hiragana. */
 
352
#define VK_DBE_SBCSCHAR                 0xF3 /* Changes the mode to single-byte characters. */
 
353
#define VK_DBE_DBCSCHAR                 0xF4 /* Changes the mode to double-byte characters. */
 
354
#define VK_DBE_ROMAN                    0xF5 /* Changes the mode to Roman characters. */
 
355
#define VK_DBE_NOROMAN                  0xF6 /* Changes the mode to non-Roman characters. */
 
356
#define VK_DBE_ENTERWORDREGISTERMODE    0xF7 /* Activates the word registration dialog box. */
 
357
#define VK_DBE_ENTERIMECONFIGMODE       0xF8 /* Activates a dialog box for setting up an IME environment. */
 
358
#define VK_DBE_FLUSHSTRING              0xF9 /* Deletes the undetermined string without determining it. */
 
359
#define VK_DBE_CODEINPUT                0xFA /* Changes the mode to code input. */
 
360
#define VK_DBE_NOCODEINPUT              0xFB /* Changes the mode to no-code input. */
 
361
 
 
362
/*
 
363
 * Virtual Scan Codes
 
364
 */
 
365
 
 
366
/**
 
367
 * Keyboard Type 4
 
368
 */
 
369
 
 
370
#define KBD4_T00                VK_NONE
 
371
#define KBD4_T01                VK_ESCAPE
 
372
#define KBD4_T02                VK_KEY_1
 
373
#define KBD4_T03                VK_KEY_2
 
374
#define KBD4_T04                VK_KEY_3
 
375
#define KBD4_T05                VK_KEY_4
 
376
#define KBD4_T06                VK_KEY_5
 
377
#define KBD4_T07                VK_KEY_6
 
378
#define KBD4_T08                VK_KEY_7
 
379
#define KBD4_T09                VK_KEY_8
 
380
#define KBD4_T0A                VK_KEY_9
 
381
#define KBD4_T0B                VK_KEY_0
 
382
#define KBD4_T0C                VK_OEM_MINUS
 
383
#define KBD4_T0D                VK_OEM_PLUS             /* NE */
 
384
#define KBD4_T0E                VK_BACK
 
385
#define KBD4_T0F                VK_TAB
 
386
#define KBD4_T10                VK_KEY_Q
 
387
#define KBD4_T11                VK_KEY_W
 
388
#define KBD4_T12                VK_KEY_E
 
389
#define KBD4_T13                VK_KEY_R
 
390
#define KBD4_T14                VK_KEY_T
 
391
#define KBD4_T15                VK_KEY_Y
 
392
#define KBD4_T16                VK_KEY_U
 
393
#define KBD4_T17                VK_KEY_I
 
394
#define KBD4_T18                VK_KEY_O
 
395
#define KBD4_T19                VK_KEY_P
 
396
#define KBD4_T1A                VK_OEM_4                /* NE */
 
397
#define KBD4_T1B                VK_OEM_6                /* NE */
 
398
#define KBD4_T1C                VK_RETURN
 
399
#define KBD4_T1D                VK_LCONTROL
 
400
#define KBD4_T1E                VK_KEY_A
 
401
#define KBD4_T1F                VK_KEY_S
 
402
#define KBD4_T20                VK_KEY_D
 
403
#define KBD4_T21                VK_KEY_F
 
404
#define KBD4_T22                VK_KEY_G
 
405
#define KBD4_T23                VK_KEY_H
 
406
#define KBD4_T24                VK_KEY_J
 
407
#define KBD4_T25                VK_KEY_K
 
408
#define KBD4_T26                VK_KEY_L
 
409
#define KBD4_T27                VK_OEM_1                /* NE */
 
410
#define KBD4_T28                VK_OEM_7                /* NE */
 
411
#define KBD4_T29                VK_OEM_3                /* NE */
 
412
#define KBD4_T2A                VK_LSHIFT
 
413
#define KBD4_T2B                VK_OEM_5
 
414
#define KBD4_T2C                VK_KEY_Z
 
415
#define KBD4_T2D                VK_KEY_X
 
416
#define KBD4_T2E                VK_KEY_C
 
417
#define KBD4_T2F                VK_KEY_V
 
418
#define KBD4_T30                VK_KEY_B
 
419
#define KBD4_T31                VK_KEY_N
 
420
#define KBD4_T32                VK_KEY_M
 
421
#define KBD4_T33                VK_OEM_COMMA
 
422
#define KBD4_T34                VK_OEM_PERIOD
 
423
#define KBD4_T35                VK_OEM_2
 
424
#define KBD4_T36                VK_RSHIFT
 
425
#define KBD4_T37                VK_MULTIPLY
 
426
#define KBD4_T38                VK_LMENU
 
427
#define KBD4_T39                VK_SPACE
 
428
#define KBD4_T3A                VK_CAPITAL
 
429
#define KBD4_T3B                VK_F1
 
430
#define KBD4_T3C                VK_F2
 
431
#define KBD4_T3D                VK_F3
 
432
#define KBD4_T3E                VK_F4
 
433
#define KBD4_T3F                VK_F5
 
434
#define KBD4_T40                VK_F6
 
435
#define KBD4_T41                VK_F7
 
436
#define KBD4_T42                VK_F8
 
437
#define KBD4_T43                VK_F9
 
438
#define KBD4_T44                VK_F10
 
439
#define KBD4_T45                VK_NUMLOCK
 
440
#define KBD4_T46                VK_SCROLL
 
441
#define KBD4_T47                VK_NUMPAD7              /* VK_HOME */
 
442
#define KBD4_T48                VK_NUMPAD8              /* VK_UP */
 
443
#define KBD4_T49                VK_NUMPAD9              /* VK_PRIOR */
 
444
#define KBD4_T4A                VK_SUBTRACT
 
445
#define KBD4_T4B                VK_NUMPAD4              /* VK_LEFT */
 
446
#define KBD4_T4C                VK_NUMPAD5              /* VK_CLEAR */
 
447
#define KBD4_T4D                VK_NUMPAD6              /* VK_RIGHT */
 
448
#define KBD4_T4E                VK_ADD
 
449
#define KBD4_T4F                VK_NUMPAD1              /* VK_END */
 
450
#define KBD4_T50                VK_NUMPAD2              /* VK_DOWN */
 
451
#define KBD4_T51                VK_NUMPAD3              /* VK_NEXT */
 
452
#define KBD4_T52                VK_NUMPAD0              /* VK_INSERT */
 
453
#define KBD4_T53                VK_DECIMAL              /* VK_DELETE */
 
454
#define KBD4_T54                VK_SNAPSHOT
 
455
#define KBD4_T55                VK_NONE
 
456
#define KBD4_T56                VK_OEM_102              /* NE */
 
457
#define KBD4_T57                VK_F11                  /* NE */
 
458
#define KBD4_T58                VK_F12                  /* NE */
 
459
#define KBD4_T59                VK_CLEAR
 
460
#define KBD4_T5A                VK_OEM_WSCTRL
 
461
#define KBD4_T5B                VK_OEM_FINISH
 
462
#define KBD4_T5C                VK_OEM_JUMP
 
463
#define KBD4_T5D                VK_EREOF
 
464
#define KBD4_T5E                VK_OEM_BACKTAB
 
465
#define KBD4_T5F                VK_OEM_AUTO
 
466
#define KBD4_T60                VK_NONE
 
467
#define KBD4_T61                VK_NONE
 
468
#define KBD4_T62                VK_ZOOM
 
469
#define KBD4_T63                VK_HELP
 
470
#define KBD4_T64                VK_F13
 
471
#define KBD4_T65                VK_F14
 
472
#define KBD4_T66                VK_F15
 
473
#define KBD4_T67                VK_F16
 
474
#define KBD4_T68                VK_F17
 
475
#define KBD4_T69                VK_F18
 
476
#define KBD4_T6A                VK_F19
 
477
#define KBD4_T6B                VK_F20
 
478
#define KBD4_T6C                VK_F21
 
479
#define KBD4_T6D                VK_F22
 
480
#define KBD4_T6E                VK_F23
 
481
#define KBD4_T6F                VK_OEM_PA3
 
482
#define KBD4_T70                VK_NONE
 
483
#define KBD4_T71                VK_OEM_RESET
 
484
#define KBD4_T72                VK_NONE
 
485
#define KBD4_T73                VK_ABNT_C1
 
486
#define KBD4_T74                VK_NONE
 
487
#define KBD4_T75                VK_NONE
 
488
#define KBD4_T76                VK_F24
 
489
#define KBD4_T77                VK_NONE
 
490
#define KBD4_T78                VK_NONE
 
491
#define KBD4_T79                VK_NONE
 
492
#define KBD4_T7A                VK_NONE
 
493
#define KBD4_T7B                VK_OEM_PA1
 
494
#define KBD4_T7C                VK_TAB
 
495
#define KBD4_T7D                VK_NONE
 
496
#define KBD4_T7E                VK_ABNT_C2
 
497
#define KBD4_T7F                VK_OEM_PA2
 
498
 
 
499
#define KBD4_X10                VK_MEDIA_PREV_TRACK
 
500
#define KBD4_X19                VK_MEDIA_NEXT_TRACK
 
501
#define KBD4_X1C                VK_RETURN
 
502
#define KBD4_X1D                VK_RCONTROL
 
503
#define KBD4_X20                VK_VOLUME_MUTE
 
504
#define KBD4_X21                VK_LAUNCH_APP2
 
505
#define KBD4_X22                VK_MEDIA_PLAY_PAUSE
 
506
#define KBD4_X24                VK_MEDIA_STOP
 
507
#define KBD4_X2E                VK_VOLUME_DOWN
 
508
#define KBD4_X30                VK_VOLUME_UP
 
509
#define KBD4_X32                VK_BROWSER_HOME
 
510
#define KBD4_X35                VK_DIVIDE
 
511
#define KBD4_X37                VK_SNAPSHOT
 
512
#define KBD4_X38                VK_RMENU
 
513
#define KBD4_X46                VK_PAUSE                /* VK_CANCEL */
 
514
#define KBD4_X47                VK_HOME
 
515
#define KBD4_X48                VK_UP
 
516
#define KBD4_X49                VK_PRIOR
 
517
#define KBD4_X4B                VK_LEFT
 
518
#define KBD4_X4D                VK_RIGHT
 
519
#define KBD4_X4F                VK_END
 
520
#define KBD4_X50                VK_DOWN
 
521
#define KBD4_X51                VK_NEXT                 /* NE */
 
522
#define KBD4_X52                VK_INSERT
 
523
#define KBD4_X53                VK_DELETE
 
524
#define KBD4_X5B                VK_LWIN
 
525
#define KBD4_X5C                VK_RWIN
 
526
#define KBD4_X5D                VK_APPS
 
527
#define KBD4_X5E                VK_POWER
 
528
#define KBD4_X5F                VK_SLEEP
 
529
#define KBD4_X65                VK_BROWSER_SEARCH
 
530
#define KBD4_X66                VK_BROWSER_FAVORITES
 
531
#define KBD4_X67                VK_BROWSER_REFRESH
 
532
#define KBD4_X68                VK_BROWSER_STOP
 
533
#define KBD4_X69                VK_BROWSER_FORWARD
 
534
#define KBD4_X6A                VK_BROWSER_BACK
 
535
#define KBD4_X6B                VK_LAUNCH_APP1
 
536
#define KBD4_X6C                VK_LAUNCH_MAIL
 
537
#define KBD4_X6D                VK_LAUNCH_MEDIA_SELECT
 
538
 
 
539
#define KBD4_Y1D                VK_PAUSE
 
540
 
 
541
/**
 
542
 * Keyboard Type 7
 
543
 */
 
544
 
 
545
#define KBD7_T00                VK_NONE
 
546
#define KBD7_T01                VK_ESCAPE
 
547
#define KBD7_T02                VK_KEY_1
 
548
#define KBD7_T03                VK_KEY_2
 
549
#define KBD7_T04                VK_KEY_3
 
550
#define KBD7_T05                VK_KEY_4
 
551
#define KBD7_T06                VK_KEY_5
 
552
#define KBD7_T07                VK_KEY_6
 
553
#define KBD7_T08                VK_KEY_7
 
554
#define KBD7_T09                VK_KEY_8
 
555
#define KBD7_T0A                VK_KEY_9
 
556
#define KBD7_T0B                VK_KEY_0
 
557
#define KBD7_T0C                VK_OEM_MINUS
 
558
#define KBD7_T0D                VK_OEM_7                /* NE */
 
559
#define KBD7_T0E                VK_BACK
 
560
#define KBD7_T0F                VK_TAB
 
561
#define KBD7_T10                VK_KEY_Q
 
562
#define KBD7_T11                VK_KEY_W
 
563
#define KBD7_T12                VK_KEY_E
 
564
#define KBD7_T13                VK_KEY_R
 
565
#define KBD7_T14                VK_KEY_T
 
566
#define KBD7_T15                VK_KEY_Y
 
567
#define KBD7_T16                VK_KEY_U
 
568
#define KBD7_T17                VK_KEY_I
 
569
#define KBD7_T18                VK_KEY_O
 
570
#define KBD7_T19                VK_KEY_P
 
571
#define KBD7_T1A                VK_OEM_4                /* NE */
 
572
#define KBD7_T1B                VK_OEM_6                /* NE */
 
573
#define KBD7_T1C                VK_RETURN
 
574
#define KBD7_T1D                VK_LCONTROL
 
575
#define KBD7_T1E                VK_KEY_A
 
576
#define KBD7_T1F                VK_KEY_S
 
577
#define KBD7_T20                VK_KEY_D
 
578
#define KBD7_T21                VK_KEY_F
 
579
#define KBD7_T22                VK_KEY_G
 
580
#define KBD7_T23                VK_KEY_H
 
581
#define KBD7_T24                VK_KEY_J
 
582
#define KBD7_T25                VK_KEY_K
 
583
#define KBD7_T26                VK_KEY_L
 
584
#define KBD7_T27                VK_OEM_PLUS             /* NE */
 
585
#define KBD7_T28                VK_OEM_1                /* NE */
 
586
#define KBD7_T29                VK_OEM_3                /* NE */
 
587
#define KBD7_T2A                VK_LSHIFT
 
588
#define KBD7_T2B                VK_OEM_5                /* NE */
 
589
#define KBD7_T2C                VK_KEY_Z
 
590
#define KBD7_T2D                VK_KEY_X
 
591
#define KBD7_T2E                VK_KEY_C
 
592
#define KBD7_T2F                VK_KEY_V
 
593
#define KBD7_T30                VK_KEY_B
 
594
#define KBD7_T31                VK_KEY_N
 
595
#define KBD7_T32                VK_KEY_M
 
596
#define KBD7_T33                VK_OEM_COMMA
 
597
#define KBD7_T34                VK_OEM_PERIOD
 
598
#define KBD7_T35                VK_OEM_2
 
599
#define KBD7_T36                VK_RSHIFT
 
600
#define KBD7_T37                VK_MULTIPLY
 
601
#define KBD7_T38                VK_LMENU
 
602
#define KBD7_T39                VK_SPACE
 
603
#define KBD7_T3A                VK_DBE_ALPHANUMERIC     /* NE */
 
604
#define KBD7_T3B                VK_F1
 
605
#define KBD7_T3C                VK_F2
 
606
#define KBD7_T3D                VK_F3
 
607
#define KBD7_T3E                VK_F4
 
608
#define KBD7_T3F                VK_F5
 
609
#define KBD7_T40                VK_F6
 
610
#define KBD7_T41                VK_F7
 
611
#define KBD7_T42                VK_F8
 
612
#define KBD7_T43                VK_F9
 
613
#define KBD7_T44                VK_F10
 
614
#define KBD7_T45                VK_NUMLOCK
 
615
#define KBD7_T46                VK_SCROLL
 
616
#define KBD7_T47                VK_HOME
 
617
#define KBD7_T48                VK_UP
 
618
#define KBD7_T49                VK_PRIOR
 
619
#define KBD7_T4A                VK_SUBTRACT
 
620
#define KBD7_T4B                VK_LEFT
 
621
#define KBD7_T4C                VK_CLEAR
 
622
#define KBD7_T4D                VK_RIGHT
 
623
#define KBD7_T4E                VK_ADD
 
624
#define KBD7_T4F                VK_END
 
625
#define KBD7_T50                VK_DOWN
 
626
#define KBD7_T51                VK_NEXT
 
627
#define KBD7_T52                VK_INSERT
 
628
#define KBD7_T53                VK_DELETE
 
629
#define KBD7_T54                VK_SNAPSHOT
 
630
#define KBD7_T55                VK_NONE
 
631
#define KBD7_T56                VK_NONE                 /* NE */
 
632
#define KBD7_T57                VK_F11
 
633
#define KBD7_T58                VK_F12
 
634
#define KBD7_T59                VK_CLEAR
 
635
#define KBD7_T5A                VK_NONAME               /* NE */
 
636
#define KBD7_T5B                VK_NONAME               /* NE */
 
637
#define KBD7_T5C                VK_NONAME               /* NE */
 
638
#define KBD7_T5D                VK_EREOF
 
639
#define KBD7_T5E                VK_NONE                 /* NE */
 
640
#define KBD7_T5F                VK_NONAME               /* NE */
 
641
#define KBD7_T60                VK_NONE
 
642
#define KBD7_T61                VK_NONE                 /* NE */
 
643
#define KBD7_T62                VK_NONE                 /* NE */
 
644
#define KBD7_T63                VK_NONE
 
645
#define KBD7_T64                VK_F13
 
646
#define KBD7_T65                VK_F14
 
647
#define KBD7_T66                VK_F15
 
648
#define KBD7_T67                VK_F16
 
649
#define KBD7_T68                VK_F17
 
650
#define KBD7_T69                VK_F18
 
651
#define KBD7_T6A                VK_F19
 
652
#define KBD7_T6B                VK_F20
 
653
#define KBD7_T6C                VK_F21
 
654
#define KBD7_T6D                VK_F22
 
655
#define KBD7_T6E                VK_F23
 
656
#define KBD7_T6F                VK_NONE                 /* NE */
 
657
#define KBD7_T70                VK_DBE_KATAKANA         /* NE */
 
658
#define KBD7_T71                VK_NONE                 /* NE */
 
659
#define KBD7_T72                VK_NONE
 
660
#define KBD7_T73                VK_OEM_102              /* NE */
 
661
#define KBD7_T74                VK_NONE
 
662
#define KBD7_T75                VK_NONE
 
663
#define KBD7_T76                VK_F24
 
664
#define KBD7_T77                VK_DBE_SBCSCHAR         /* NE */
 
665
#define KBD7_T78                VK_NONE
 
666
#define KBD7_T79                VK_CONVERT              /* NE */
 
667
#define KBD7_T7A                VK_NONE
 
668
#define KBD7_T7B                VK_NONCONVERT           /* NE */
 
669
#define KBD7_T7C                VK_TAB
 
670
#define KBD7_T7D                VK_NONE                 /* NE */
 
671
#define KBD7_T7E                VK_ABNT_C2
 
672
#define KBD7_T7F                VK_OEM_PA2
 
673
 
 
674
#define KBD7_X10                VK_MEDIA_PREV_TRACK
 
675
#define KBD7_X19                VK_MEDIA_NEXT_TRACK
 
676
#define KBD7_X1C                VK_RETURN
 
677
#define KBD7_X1D                VK_RCONTROL             /* NE */
 
678
#define KBD7_X20                VK_VOLUME_MUTE
 
679
#define KBD7_X21                VK_LAUNCH_APP2
 
680
#define KBD7_X22                VK_MEDIA_PLAY_PAUSE
 
681
#define KBD7_X24                VK_MEDIA_STOP
 
682
#define KBD7_X2E                VK_VOLUME_DOWN
 
683
#define KBD7_X30                VK_VOLUME_UP
 
684
#define KBD7_X32                VK_BROWSER_HOME
 
685
#define KBD7_X33                VK_OEM_8                /* NE */
 
686
#define KBD7_X35                VK_DIVIDE
 
687
#define KBD7_X37                VK_SNAPSHOT
 
688
#define KBD7_X38                VK_DBE_HIRAGANA         /* NE */
 
689
#define KBD7_X42                VK_NONE
 
690
#define KBD7_X43                VK_NONE
 
691
#define KBD7_X44                VK_NONE
 
692
#define KBD7_X46                VK_CANCEL
 
693
#define KBD7_X47                VK_HOME
 
694
#define KBD7_X48                VK_UP
 
695
#define KBD7_X49                VK_PRIOR
 
696
#define KBD7_X4B                VK_LEFT
 
697
#define KBD7_X4D                VK_RIGHT
 
698
#define KBD7_X4F                VK_END
 
699
#define KBD7_X50                VK_DOWN
 
700
#define KBD7_X51                VK_NEXT
 
701
#define KBD7_X52                VK_INSERT
 
702
#define KBD7_X53                VK_DELETE
 
703
#define KBD7_X5B                VK_LWIN
 
704
#define KBD7_X5C                VK_RWIN
 
705
#define KBD7_X5D                VK_APPS
 
706
#define KBD7_X5E                VK_POWER
 
707
#define KBD7_X5F                VK_SLEEP
 
708
#define KBD7_X65                VK_BROWSER_SEARCH
 
709
#define KBD7_X66                VK_BROWSER_FAVORITES
 
710
#define KBD7_X67                VK_BROWSER_REFRESH
 
711
#define KBD7_X68                VK_BROWSER_STOP
 
712
#define KBD7_X69                VK_BROWSER_FORWARD
 
713
#define KBD7_X6A                VK_BROWSER_BACK
 
714
#define KBD7_X6B                VK_LAUNCH_APP1
 
715
#define KBD7_X6C                VK_LAUNCH_MAIL
 
716
#define KBD7_X6D                VK_LAUNCH_MEDIA_SELECT
 
717
#define KBD7_XF1                VK_NONE                 /* NE */
 
718
#define KBD7_XF2                VK_NONE                 /* NE */
 
719
 
 
720
#define KBD7_Y1D                VK_PAUSE
 
721
 
 
722
/**
 
723
 * X11 Keycodes
 
724
 */
 
725
 
 
726
/**
 
727
 * Mac OS X
 
728
 */
 
729
 
 
730
#define APPLE_VK_ANSI_A                 0x00
 
731
#define APPLE_VK_ANSI_S                 0x01
 
732
#define APPLE_VK_ANSI_D                 0x02
 
733
#define APPLE_VK_ANSI_F                 0x03
 
734
#define APPLE_VK_ANSI_H                 0x04
 
735
#define APPLE_VK_ANSI_G                 0x05
 
736
#define APPLE_VK_ANSI_Z                 0x06
 
737
#define APPLE_VK_ANSI_X                 0x07
 
738
#define APPLE_VK_ANSI_C                 0x08
 
739
#define APPLE_VK_ANSI_V                 0x09
 
740
#define APPLE_VK_ISO_Section            0x0A
 
741
#define APPLE_VK_ANSI_B                 0x0B
 
742
#define APPLE_VK_ANSI_Q                 0x0C
 
743
#define APPLE_VK_ANSI_W                 0x0D
 
744
#define APPLE_VK_ANSI_E                 0x0E
 
745
#define APPLE_VK_ANSI_R                 0x0F
 
746
#define APPLE_VK_ANSI_Y                 0x10
 
747
#define APPLE_VK_ANSI_T                 0x11
 
748
#define APPLE_VK_ANSI_1                 0x12
 
749
#define APPLE_VK_ANSI_2                 0x13
 
750
#define APPLE_VK_ANSI_3                 0x14
 
751
#define APPLE_VK_ANSI_4                 0x15
 
752
#define APPLE_VK_ANSI_6                 0x16
 
753
#define APPLE_VK_ANSI_5                 0x17
 
754
#define APPLE_VK_ANSI_Equal             0x18
 
755
#define APPLE_VK_ANSI_9                 0x19
 
756
#define APPLE_VK_ANSI_7                 0x1A
 
757
#define APPLE_VK_ANSI_Minus             0x1B
 
758
#define APPLE_VK_ANSI_8                 0x1C
 
759
#define APPLE_VK_ANSI_0                 0x1D
 
760
#define APPLE_VK_ANSI_RightBracket      0x1E
 
761
#define APPLE_VK_ANSI_O                 0x1F
 
762
#define APPLE_VK_ANSI_U                 0x20
 
763
#define APPLE_VK_ANSI_LeftBracket       0x21
 
764
#define APPLE_VK_ANSI_I                 0x22
 
765
#define APPLE_VK_ANSI_P                 0x23
 
766
#define APPLE_VK_Return                 0x24
 
767
#define APPLE_VK_ANSI_L                 0x25
 
768
#define APPLE_VK_ANSI_J                 0x26
 
769
#define APPLE_VK_ANSI_Quote             0x27
 
770
#define APPLE_VK_ANSI_K                 0x28
 
771
#define APPLE_VK_ANSI_Semicolon         0x29
 
772
#define APPLE_VK_ANSI_Backslash         0x2A
 
773
#define APPLE_VK_ANSI_Comma             0x2B
 
774
#define APPLE_VK_ANSI_Slash             0x2C
 
775
#define APPLE_VK_ANSI_N                 0x2D
 
776
#define APPLE_VK_ANSI_M                 0x2E
 
777
#define APPLE_VK_ANSI_Period            0x2F
 
778
#define APPLE_VK_Tab                    0x30
 
779
#define APPLE_VK_Space                  0x31
 
780
#define APPLE_VK_ANSI_Grave             0x32
 
781
#define APPLE_VK_Delete                 0x33
 
782
#define APPLE_VK_0x34                   0x34
 
783
#define APPLE_VK_Escape                 0x35
 
784
#define APPLE_VK_0x36                   0x36
 
785
#define APPLE_VK_Command                0x37
 
786
#define APPLE_VK_Shift                  0x38
 
787
#define APPLE_VK_CapsLock               0x39
 
788
#define APPLE_VK_Option                 0x3A
 
789
#define APPLE_VK_Control                0x3B
 
790
#define APPLE_VK_RightShift             0x3C
 
791
#define APPLE_VK_RightOption            0x3D
 
792
#define APPLE_VK_RightControl           0x3E
 
793
#define APPLE_VK_Function               0x3F
 
794
#define APPLE_VK_F17                    0x40
 
795
#define APPLE_VK_ANSI_KeypadDecimal     0x41
 
796
#define APPLE_VK_0x42                   0x42
 
797
#define APPLE_VK_ANSI_KeypadMultiply    0x43
 
798
#define APPLE_VK_0x44                   0x44
 
799
#define APPLE_VK_ANSI_KeypadPlus        0x45
 
800
#define APPLE_VK_0x46                   0x46
 
801
#define APPLE_VK_ANSI_KeypadClear       0x47
 
802
#define APPLE_VK_VolumeUp               0x48
 
803
#define APPLE_VK_VolumeDown             0x49
 
804
#define APPLE_VK_Mute                   0x4A
 
805
#define APPLE_VK_ANSI_KeypadDivide      0x4B
 
806
#define APPLE_VK_ANSI_KeypadEnter       0x4C
 
807
#define APPLE_VK_0x4D                   0x4D
 
808
#define APPLE_VK_ANSI_KeypadMinus       0x4E
 
809
#define APPLE_VK_F18                    0x4F
 
810
#define APPLE_VK_F19                    0x50
 
811
#define APPLE_VK_ANSI_KeypadEquals      0x51
 
812
#define APPLE_VK_ANSI_Keypad0           0x52
 
813
#define APPLE_VK_ANSI_Keypad1           0x53
 
814
#define APPLE_VK_ANSI_Keypad2           0x54
 
815
#define APPLE_VK_ANSI_Keypad3           0x55
 
816
#define APPLE_VK_ANSI_Keypad4           0x56
 
817
#define APPLE_VK_ANSI_Keypad5           0x57
 
818
#define APPLE_VK_ANSI_Keypad6           0x58
 
819
#define APPLE_VK_ANSI_Keypad7           0x59
 
820
#define APPLE_VK_F20                    0x5A
 
821
#define APPLE_VK_ANSI_Keypad8           0x5B
 
822
#define APPLE_VK_ANSI_Keypad9           0x5C
 
823
#define APPLE_VK_JIS_Yen                0x5D
 
824
#define APPLE_VK_JIS_Underscore         0x5E
 
825
#define APPLE_VK_JIS_KeypadComma        0x5F
 
826
#define APPLE_VK_F5                     0x60
 
827
#define APPLE_VK_F6                     0x61
 
828
#define APPLE_VK_F7                     0x62
 
829
#define APPLE_VK_F3                     0x63
 
830
#define APPLE_VK_F8                     0x64
 
831
#define APPLE_VK_F9                     0x65
 
832
#define APPLE_VK_JIS_Eisu               0x66
 
833
#define APPLE_VK_F11                    0x67
 
834
#define APPLE_VK_JIS_Kana               0x68
 
835
#define APPLE_VK_F13                    0x69
 
836
#define APPLE_VK_F16                    0x6A
 
837
#define APPLE_VK_F14                    0x6B
 
838
#define APPLE_VK_F10                    0x6D
 
839
#define APPLE_VK_0x6C                   0x6C
 
840
#define APPLE_VK_0x6E                   0x6E
 
841
#define APPLE_VK_F12                    0x6F
 
842
#define APPLE_VK_0x70                   0x70
 
843
#define APPLE_VK_F15                    0x71
 
844
#define APPLE_VK_Help                   0x72
 
845
#define APPLE_VK_Home                   0x73
 
846
#define APPLE_VK_PageUp                 0x74
 
847
#define APPLE_VK_ForwardDelete          0x75
 
848
#define APPLE_VK_F4                     0x76
 
849
#define APPLE_VK_End                    0x77
 
850
#define APPLE_VK_F2                     0x78
 
851
#define APPLE_VK_PageDown               0x79
 
852
#define APPLE_VK_F1                     0x7A
 
853
#define APPLE_VK_LeftArrow              0x7B
 
854
#define APPLE_VK_RightArrow             0x7C
 
855
#define APPLE_VK_DownArrow              0x7D
 
856
#define APPLE_VK_UpArrow                0x7E
 
857
 
 
858
#ifdef __cplusplus
 
859
extern "C" {
 
860
#endif
 
861
 
 
862
/**
 
863
 * Functions
 
864
 */
 
865
 
 
866
WINPR_API char* GetVirtualKeyName(DWORD vkcode);
 
867
WINPR_API DWORD GetVirtualKeyCodeFromName(const char* vkname);
 
868
WINPR_API DWORD GetVirtualKeyCodeFromXkbKeyName(const char* xkbname);
 
869
 
 
870
WINPR_API DWORD GetVirtualKeyCodeFromVirtualScanCode(DWORD scancode, DWORD dwKeyboardType);
 
871
WINPR_API DWORD GetVirtualScanCodeFromVirtualKeyCode(DWORD vkcode, DWORD dwKeyboardType);
 
872
 
 
873
#define KEYCODE_TYPE_APPLE              0x00000001
 
874
#define KEYCODE_TYPE_EVDEV              0x00000002
 
875
 
 
876
WINPR_API DWORD GetVirtualKeyCodeFromKeycode(DWORD keycode, DWORD dwFlags);
 
877
WINPR_API DWORD GetKeycodeFromVirtualKeyCode(DWORD keycode, DWORD dwFlags);
 
878
 
 
879
#ifdef __cplusplus
 
880
}
 
881
#endif
 
882
 
 
883
#endif /* WINPR_INPUT_H */