• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2006 Michael Emmel mike.emmel@gmail.com. All rights reserved.
3  * Copyright (C) 2008, 2009 Google Inc.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions
7  * are met:
8  * 1. Redistributions of source code must retain the above copyright
9  *    notice, this list of conditions and the following disclaimer.
10  * 2. Redistributions in binary form must reproduce the above copyright
11  *    notice, this list of conditions and the following disclaimer in the
12  *    documentation and/or other materials provided with the distribution.
13  *
14  * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
15  * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
17  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
18  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
20  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, LOSS OF USE, DATA, OR
21  * PROFITS, OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
22  * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
24  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25  */
26 
27 #ifndef KeyboardCodesPosix_h
28 #define KeyboardCodesPosix_h
29 
30 namespace WebCore {
31 
32     enum {
33         // VKEY_LBUTTON (01) Left mouse button
34         // VKEY_RBUTTON (02) Right mouse button
35         // VKEY_CANCEL (03) Control-break processing
36         // VKEY_MBUTTON (04) Middle mouse button (three-button mouse)
37         // VKEY_XBUTTON1 (05)
38         // VKEY_XBUTTON2 (06)
39 
40         // VKEY_BACK (08) BACKSPACE key
41         VKEY_BACK = 0x08,
42 
43         // VKEY_TAB (09) TAB key
44         VKEY_TAB = 0x09,
45 
46         // VKEY_CLEAR (0C) CLEAR key
47         VKEY_CLEAR = 0x0C,
48 
49         // VKEY_RETURN (0D)
50         VKEY_RETURN = 0x0D,
51 
52         // VKEY_SHIFT (10) SHIFT key
53         VKEY_SHIFT = 0x10,
54 
55         // VKEY_CONTROL (11) CTRL key
56         VKEY_CONTROL = 0x11,
57 
58         // VKEY_MENU (12) ALT key
59         VKEY_MENU = 0x12,
60 
61         // VKEY_PAUSE (13) PAUSE key
62         VKEY_PAUSE = 0x13,
63 
64         // VKEY_CAPITAL (14) CAPS LOCK key
65         VKEY_CAPITAL = 0x14,
66 
67         // VKEY_KANA (15) Input Method Editor (IME) Kana mode
68         VKEY_KANA = 0x15,
69 
70         // VKEY_HANGUEL (15) IME Hanguel mode (maintained for compatibility, use VKEY_HANGUL)
71         // VKEY_HANGUL (15) IME Hangul mode
72         VKEY_HANGUL = 0x15,
73 
74         // VKEY_JUNJA (17) IME Junja mode
75         VKEY_JUNJA = 0x17,
76 
77         // VKEY_FINAL (18) IME final mode
78         VKEY_FINAL = 0x18,
79 
80         // VKEY_HANJA (19) IME Hanja mode
81         VKEY_HANJA = 0x19,
82 
83         // VKEY_KANJI (19) IME Kanji mode
84         VKEY_KANJI = 0x19,
85 
86         // VKEY_ESCAPE (1B) ESC key
87         VKEY_ESCAPE = 0x1B,
88 
89         // VKEY_CONVERT (1C) IME convert
90         VKEY_CONVERT = 0x1C,
91 
92         // VKEY_NONCONVERT (1D) IME nonconvert
93         VKEY_NONCONVERT = 0x1D,
94 
95         // VKEY_ACCEPT (1E) IME accept
96         VKEY_ACCEPT = 0x1E,
97 
98         // VKEY_MODECHANGE (1F) IME mode change request
99         VKEY_MODECHANGE = 0x1F,
100 
101         // VKEY_SPACE (20) SPACEBAR
102         VKEY_SPACE = 0x20,
103 
104         // VKEY_PRIOR (21) PAGE UP key
105         VKEY_PRIOR = 0x21,
106 
107         // VKEY_NEXT (22) PAGE DOWN key
108         VKEY_NEXT = 0x22,
109 
110         // VKEY_END (23) END key
111         VKEY_END = 0x23,
112 
113         // VKEY_HOME (24) HOME key
114         VKEY_HOME = 0x24,
115 
116         // VKEY_LEFT (25) LEFT ARROW key
117         VKEY_LEFT = 0x25,
118 
119         // VKEY_UP (26) UP ARROW key
120         VKEY_UP = 0x26,
121 
122         // VKEY_RIGHT (27) RIGHT ARROW key
123         VKEY_RIGHT = 0x27,
124 
125         // VKEY_DOWN (28) DOWN ARROW key
126         VKEY_DOWN = 0x28,
127 
128         // VKEY_SELECT (29) SELECT key
129         VKEY_SELECT = 0x29,
130 
131         // VKEY_PRINT (2A) PRINT key
132         VKEY_PRINT = 0x2A,
133 
134         // VKEY_EXECUTE (2B) EXECUTE key
135         VKEY_EXECUTE = 0x2B,
136 
137         // VKEY_SNAPSHOT (2C) PRINT SCREEN key
138         VKEY_SNAPSHOT = 0x2C,
139 
140         // VKEY_INSERT (2D) INS key
141         VKEY_INSERT = 0x2D,
142 
143         // VKEY_DELETE (2E) DEL key
144         VKEY_DELETE = 0x2E,
145 
146         // VKEY_HELP (2F) HELP key
147         VKEY_HELP = 0x2F,
148 
149         // (30) 0 key
150         VKEY_0 = 0x30,
151 
152         // (31) 1 key
153         VKEY_1 = 0x31,
154 
155         // (32) 2 key
156         VKEY_2 = 0x32,
157 
158         // (33) 3 key
159         VKEY_3 = 0x33,
160 
161         // (34) 4 key
162         VKEY_4 = 0x34,
163 
164         // (35) 5 key,
165 
166         VKEY_5 = 0x35,
167 
168         // (36) 6 key
169         VKEY_6 = 0x36,
170 
171         // (37) 7 key
172         VKEY_7 = 0x37,
173 
174         // (38) 8 key
175         VKEY_8 = 0x38,
176 
177         // (39) 9 key
178         VKEY_9 = 0x39,
179 
180         // (41) A key
181         VKEY_A = 0x41,
182 
183         // (42) B key
184         VKEY_B = 0x42,
185 
186         // (43) C key
187         VKEY_C = 0x43,
188 
189         // (44) D key
190         VKEY_D = 0x44,
191 
192         // (45) E key
193         VKEY_E = 0x45,
194 
195         // (46) F key
196         VKEY_F = 0x46,
197 
198         // (47) G key
199         VKEY_G = 0x47,
200 
201         // (48) H key
202         VKEY_H = 0x48,
203 
204         // (49) I key
205         VKEY_I = 0x49,
206 
207         // (4A) J key
208         VKEY_J = 0x4A,
209 
210         // (4B) K key
211         VKEY_K = 0x4B,
212 
213         // (4C) L key
214         VKEY_L = 0x4C,
215 
216         // (4D) M key
217         VKEY_M = 0x4D,
218 
219         // (4E) N key
220         VKEY_N = 0x4E,
221 
222         // (4F) O key
223         VKEY_O = 0x4F,
224 
225         // (50) P key
226         VKEY_P = 0x50,
227 
228         // (51) Q key
229         VKEY_Q = 0x51,
230 
231         // (52) R key
232         VKEY_R = 0x52,
233 
234         // (53) S key
235         VKEY_S = 0x53,
236 
237         // (54) T key
238         VKEY_T = 0x54,
239 
240         // (55) U key
241         VKEY_U = 0x55,
242 
243         // (56) V key
244         VKEY_V = 0x56,
245 
246         // (57) W key
247         VKEY_W = 0x57,
248 
249         // (58) X key
250         VKEY_X = 0x58,
251 
252         // (59) Y key
253         VKEY_Y = 0x59,
254 
255         // (5A) Z key
256         VKEY_Z = 0x5A,
257 
258         // VKEY_LWIN (5B) Left Windows key (Microsoft Natural keyboard)
259         VKEY_LWIN = 0x5B,
260 
261         // VKEY_RWIN (5C) Right Windows key (Natural keyboard)
262         VKEY_RWIN = 0x5C,
263 
264         // VKEY_APPS (5D) Applications key (Natural keyboard)
265         VKEY_APPS = 0x5D,
266 
267         // VKEY_SLEEP (5F) Computer Sleep key
268         VKEY_SLEEP = 0x5F,
269 
270         // VKEY_NUMPAD0 (60) Numeric keypad 0 key
271         VKEY_NUMPAD0 = 0x60,
272 
273         // VKEY_NUMPAD1 (61) Numeric keypad 1 key
274         VKEY_NUMPAD1 = 0x61,
275 
276         // VKEY_NUMPAD2 (62) Numeric keypad 2 key
277         VKEY_NUMPAD2 = 0x62,
278 
279         // VKEY_NUMPAD3 (63) Numeric keypad 3 key
280         VKEY_NUMPAD3 = 0x63,
281 
282         // VKEY_NUMPAD4 (64) Numeric keypad 4 key
283         VKEY_NUMPAD4 = 0x64,
284 
285         // VKEY_NUMPAD5 (65) Numeric keypad 5 key
286         VKEY_NUMPAD5 = 0x65,
287 
288         // VKEY_NUMPAD6 (66) Numeric keypad 6 key
289         VKEY_NUMPAD6 = 0x66,
290 
291         // VKEY_NUMPAD7 (67) Numeric keypad 7 key
292         VKEY_NUMPAD7 = 0x67,
293 
294         // VKEY_NUMPAD8 (68) Numeric keypad 8 key
295         VKEY_NUMPAD8 = 0x68,
296 
297         // VKEY_NUMPAD9 (69) Numeric keypad 9 key
298         VKEY_NUMPAD9 = 0x69,
299 
300         // VKEY_MULTIPLY (6A) Multiply key
301         VKEY_MULTIPLY = 0x6A,
302 
303         // VKEY_ADD (6B) Add key
304         VKEY_ADD = 0x6B,
305 
306         // VKEY_SEPARATOR (6C) Separator key
307         VKEY_SEPARATOR = 0x6C,
308 
309         // VKEY_SUBTRACT (6D) Subtract key
310         VKEY_SUBTRACT = 0x6D,
311 
312         // VKEY_DECIMAL (6E) Decimal key
313         VKEY_DECIMAL = 0x6E,
314 
315         // VKEY_DIVIDE (6F) Divide key
316         VKEY_DIVIDE = 0x6F,
317 
318         // VKEY_F1 (70) F1 key
319         VKEY_F1 = 0x70,
320 
321         // VKEY_F2 (71) F2 key
322         VKEY_F2 = 0x71,
323 
324         // VKEY_F3 (72) F3 key
325         VKEY_F3 = 0x72,
326 
327         // VKEY_F4 (73) F4 key
328         VKEY_F4 = 0x73,
329 
330         // VKEY_F5 (74) F5 key
331         VKEY_F5 = 0x74,
332 
333         // VKEY_F6 (75) F6 key
334         VKEY_F6 = 0x75,
335 
336         // VKEY_F7 (76) F7 key
337         VKEY_F7 = 0x76,
338 
339         // VKEY_F8 (77) F8 key
340         VKEY_F8 = 0x77,
341 
342         // VKEY_F9 (78) F9 key
343         VKEY_F9 = 0x78,
344 
345         // VKEY_F10 (79) F10 key
346         VKEY_F10 = 0x79,
347 
348         // VKEY_F11 (7A) F11 key
349         VKEY_F11 = 0x7A,
350 
351         // VKEY_F12 (7B) F12 key
352         VKEY_F12 = 0x7B,
353 
354         // VKEY_F13 (7C) F13 key
355         VKEY_F13 = 0x7C,
356 
357         // VKEY_F14 (7D) F14 key
358         VKEY_F14 = 0x7D,
359 
360         // VKEY_F15 (7E) F15 key
361         VKEY_F15 = 0x7E,
362 
363         // VKEY_F16 (7F) F16 key
364         VKEY_F16 = 0x7F,
365 
366         // VKEY_F17 (80H) F17 key
367         VKEY_F17 = 0x80,
368 
369         // VKEY_F18 (81H) F18 key
370         VKEY_F18 = 0x81,
371 
372         // VKEY_F19 (82H) F19 key
373         VKEY_F19 = 0x82,
374 
375         // VKEY_F20 (83H) F20 key
376         VKEY_F20 = 0x83,
377 
378         // VKEY_F21 (84H) F21 key
379         VKEY_F21 = 0x84,
380 
381         // VKEY_F22 (85H) F22 key
382         VKEY_F22 = 0x85,
383 
384         // VKEY_F23 (86H) F23 key
385         VKEY_F23 = 0x86,
386 
387         // VKEY_F24 (87H) F24 key
388         VKEY_F24 = 0x87,
389 
390         // VKEY_NUMLOCK (90) NUM LOCK key
391         VKEY_NUMLOCK = 0x90,
392 
393         // VKEY_SCROLL (91) SCROLL LOCK key
394         VKEY_SCROLL = 0x91,
395 
396         // VKEY_LSHIFT (A0) Left SHIFT key
397         VKEY_LSHIFT = 0xA0,
398 
399         // VKEY_RSHIFT (A1) Right SHIFT key
400         VKEY_RSHIFT = 0xA1,
401 
402         // VKEY_LCONTROL (A2) Left CONTROL key
403         VKEY_LCONTROL = 0xA2,
404 
405         // VKEY_RCONTROL (A3) Right CONTROL key
406         VKEY_RCONTROL = 0xA3,
407 
408         // VKEY_LMENU (A4) Left MENU key
409         VKEY_LMENU = 0xA4,
410 
411         // VKEY_RMENU (A5) Right MENU key
412         VKEY_RMENU = 0xA5,
413 
414         // VKEY_BROWSER_BACK (A6) Windows 2000/XP: Browser Back key
415         VKEY_BROWSER_BACK = 0xA6,
416 
417         // VKEY_BROWSER_FORWARD (A7) Windows 2000/XP: Browser Forward key
418         VKEY_BROWSER_FORWARD = 0xA7,
419 
420         // VKEY_BROWSER_REFRESH (A8) Windows 2000/XP: Browser Refresh key
421         VKEY_BROWSER_REFRESH = 0xA8,
422 
423         // VKEY_BROWSER_STOP (A9) Windows 2000/XP: Browser Stop key
424         VKEY_BROWSER_STOP = 0xA9,
425 
426         // VKEY_BROWSER_SEARCH (AA) Windows 2000/XP: Browser Search key
427         VKEY_BROWSER_SEARCH = 0xAA,
428 
429         // VKEY_BROWSER_FAVORITES (AB) Windows 2000/XP: Browser Favorites key
430         VKEY_BROWSER_FAVORITES = 0xAB,
431 
432         // VKEY_BROWSER_HOME (AC) Windows 2000/XP: Browser Start and Home key
433         VKEY_BROWSER_HOME = 0xAC,
434 
435         // VKEY_VOLUME_MUTE (AD) Windows 2000/XP: Volume Mute key
436         VKEY_VOLUME_MUTE = 0xAD,
437 
438         // VKEY_VOLUME_DOWN (AE) Windows 2000/XP: Volume Down key
439         VKEY_VOLUME_DOWN = 0xAE,
440 
441         // VKEY_VOLUME_UP (AF) Windows 2000/XP: Volume Up key
442         VKEY_VOLUME_UP = 0xAF,
443 
444         // VKEY_MEDIA_NEXT_TRACK (B0) Windows 2000/XP: Next Track key
445         VKEY_MEDIA_NEXT_TRACK = 0xB0,
446 
447         // VKEY_MEDIA_PREV_TRACK (B1) Windows 2000/XP: Previous Track key
448         VKEY_MEDIA_PREV_TRACK = 0xB1,
449 
450         // VKEY_MEDIA_STOP (B2) Windows 2000/XP: Stop Media key
451         VKEY_MEDIA_STOP = 0xB2,
452 
453         // VKEY_MEDIA_PLAY_PAUSE (B3) Windows 2000/XP: Play/Pause Media key
454         VKEY_MEDIA_PLAY_PAUSE = 0xB3,
455 
456         // VKEY_LAUNCH_MAIL (B4) Windows 2000/XP: Start Mail key
457         VKEY_MEDIA_LAUNCH_MAIL = 0xB4,
458 
459         // VKEY_LAUNCH_MEDIA_SELECT (B5) Windows 2000/XP: Select Media key
460         VKEY_MEDIA_LAUNCH_MEDIA_SELECT = 0xB5,
461 
462         // VKEY_LAUNCH_APP1 (B6) Windows 2000/XP: Start Application 1 key
463         VKEY_MEDIA_LAUNCH_APP1 = 0xB6,
464 
465         // VKEY_LAUNCH_APP2 (B7) Windows 2000/XP: Start Application 2 key
466         VKEY_MEDIA_LAUNCH_APP2 = 0xB7,
467 
468         // VKEY_OEM_1 (BA) Used for miscellaneous characters, it can vary by keyboard. Windows 2000/XP: For the US standard keyboard, the ',:' key
469         VKEY_OEM_1 = 0xBA,
470 
471         // VKEY_OEM_PLUS (BB) Windows 2000/XP: For any country/region, the '+' key
472         VKEY_OEM_PLUS = 0xBB,
473 
474         // VKEY_OEM_COMMA (BC) Windows 2000/XP: For any country/region, the ',' key
475         VKEY_OEM_COMMA = 0xBC,
476 
477         // VKEY_OEM_MINUS (BD) Windows 2000/XP: For any country/region, the '-' key
478         VKEY_OEM_MINUS = 0xBD,
479 
480         // VKEY_OEM_PERIOD (BE) Windows 2000/XP: For any country/region, the '.' key
481         VKEY_OEM_PERIOD = 0xBE,
482 
483         // VKEY_OEM_2 (BF) Used for miscellaneous characters, it can vary by keyboard. Windows 2000/XP: For the US standard keyboard, the '/?' key
484         VKEY_OEM_2 = 0xBF,
485 
486         // VKEY_OEM_3 (C0) Used for miscellaneous characters, it can vary by keyboard. Windows 2000/XP: For the US standard keyboard, the '`~' key
487         VKEY_OEM_3 = 0xC0,
488 
489         // VKEY_OEM_4 (DB) Used for miscellaneous characters, it can vary by keyboard. Windows 2000/XP: For the US standard keyboard, the '[{' key
490         VKEY_OEM_4 = 0xDB,
491 
492         // VKEY_OEM_5 (DC) Used for miscellaneous characters, it can vary by keyboard. Windows 2000/XP: For the US standard keyboard, the '\|' key
493         VKEY_OEM_5 = 0xDC,
494 
495         // VKEY_OEM_6 (DD) Used for miscellaneous characters, it can vary by keyboard. Windows 2000/XP: For the US standard keyboard, the ']}' key
496         VKEY_OEM_6 = 0xDD,
497 
498         // VKEY_OEM_7 (DE) Used for miscellaneous characters, it can vary by keyboard. Windows 2000/XP: For the US standard keyboard, the 'single-quote/double-quote' key
499         VKEY_OEM_7 = 0xDE,
500 
501         // VKEY_OEM_8 (DF) Used for miscellaneous characters, it can vary by keyboard.
502         VKEY_OEM_8 = 0xDF,
503 
504         // VKEY_OEM_102 (E2) Windows 2000/XP: Either the angle bracket key or the backslash key on the RT 102-key keyboard
505         VKEY_OEM_102 = 0xE2,
506 
507         // VKEY_PROCESSKEY (E5) Windows 95/98/Me, Windows NT 4.0, Windows 2000/XP: IME PROCESS key
508         VKEY_PROCESSKEY = 0xE5,
509 
510         // VKEY_PACKET (E7) Windows 2000/XP: Used to pass Unicode characters as if they were keystrokes. The VKEY_PACKET key is the low word of a 32-bit Virtual Key value used for non-keyboard input methods. For more information, see Remark in KEYBDINPUT,SendInput, WM_KEYDOWN, and WM_KEYUP
511         VKEY_PACKET = 0xE7,
512 
513         // VKEY_ATTN (F6) Attn key
514         VKEY_ATTN = 0xF6,
515 
516         // VKEY_CRSEL (F7) CrSel key
517         VKEY_CRSEL = 0xF7,
518 
519         // VKEY_EXSEL (F8) ExSel key
520         VKEY_EXSEL = 0xF8,
521 
522         // VKEY_EREOF (F9) Erase EOF key
523         VKEY_EREOF = 0xF9,
524 
525         // VKEY_PLAY (FA) Play key
526         VKEY_PLAY = 0xFA,
527 
528         // VKEY_ZOOM (FB) Zoom key
529         VKEY_ZOOM = 0xFB,
530 
531         // VKEY_NONAME (FC) Reserved for future use
532         VKEY_NONAME = 0xFC,
533 
534         // VKEY_PA1 (FD) PA1 key
535         VKEY_PA1 = 0xFD,
536 
537         // VKEY_OEM_CLEAR (FE) Clear key
538         VKEY_OEM_CLEAR = 0xFE,
539 
540         VKEY_UNKNOWN = 0
541     };
542 
543 } // namespace WebCore
544 
545 #endif
546