2 * Copyright (c) 2008, 2009, Google Inc. All rights reserved.
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are
8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above
11 * copyright notice, this list of conditions and the following disclaimer
12 * in the documentation and/or other materials provided with the
14 * * Neither the name of Google Inc. nor the names of its
15 * contributors may be used to endorse or promote products derived from
16 * this software without specific prior written permission.
18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 #ifndef KeyboardCodes_h
32 #define KeyboardCodes_h
38 #include "platform/WindowsKeyboardCodes.h"
43 // VKEY_LBUTTON (01) Left mouse button
44 // VKEY_RBUTTON (02) Right mouse button
45 // VKEY_CANCEL (03) Control-break processing
46 // VKEY_MBUTTON (04) Middle mouse button (three-button mouse)
50 // VKEY_BACK (08) BACKSPACE key
53 // VKEY_TAB (09) TAB key
56 // VKEY_CLEAR (0C) CLEAR key
57 VKEY_CLEAR
= VK_CLEAR
,
60 VKEY_RETURN
= VK_RETURN
,
62 // VKEY_SHIFT (10) SHIFT key
63 VKEY_SHIFT
= VK_SHIFT
,
65 // VKEY_CONTROL (11) CTRL key
66 VKEY_CONTROL
= VK_CONTROL
,
68 // VKEY_MENU (12) ALT key
71 // VKEY_PAUSE (13) PAUSE key
72 VKEY_PAUSE
= VK_PAUSE
,
74 // VKEY_CAPITAL (14) CAPS LOCK key
75 VKEY_CAPITAL
= VK_CAPITAL
,
77 // VKEY_KANA (15) Input Method Editor (IME) Kana mode
80 // VKEY_HANGUEL (15) IME Hanguel mode (maintained for compatibility, use VKEY_HANGUL)
81 // VKEY_HANGUL (15) IME Hangul mode
82 VKEY_HANGUL
= VK_HANGUL
,
84 // VKEY_JUNJA (17) IME Junja mode
85 VKEY_JUNJA
= VK_JUNJA
,
87 // VKEY_FINAL (18) IME final mode
88 VKEY_FINAL
= VK_FINAL
,
90 // VKEY_HANJA (19) IME Hanja mode
91 VKEY_HANJA
= VK_HANJA
,
93 // VKEY_KANJI (19) IME Kanji mode
94 VKEY_KANJI
= VK_KANJI
,
96 // VKEY_ESCAPE (1B) ESC key
97 VKEY_ESCAPE
= VK_ESCAPE
,
99 // VKEY_CONVERT (1C) IME convert
100 VKEY_CONVERT
= VK_CONVERT
,
102 // VKEY_NONCONVERT (1D) IME nonconvert
103 VKEY_NONCONVERT
= VK_NONCONVERT
,
105 // VKEY_ACCEPT (1E) IME accept
106 VKEY_ACCEPT
= VK_ACCEPT
,
108 // VKEY_MODECHANGE (1F) IME mode change request
109 VKEY_MODECHANGE
= VK_MODECHANGE
,
111 // VKEY_SPACE (20) SPACEBAR
112 VKEY_SPACE
= VK_SPACE
,
114 // VKEY_PRIOR (21) PAGE UP key
115 VKEY_PRIOR
= VK_PRIOR
,
117 // VKEY_NEXT (22) PAGE DOWN key
120 // VKEY_END (23) END key
123 // VKEY_HOME (24) HOME key
126 // VKEY_LEFT (25) LEFT ARROW key
129 // VKEY_UP (26) UP ARROW key
132 // VKEY_RIGHT (27) RIGHT ARROW key
133 VKEY_RIGHT
= VK_RIGHT
,
135 // VKEY_DOWN (28) DOWN ARROW key
138 // VKEY_SELECT (29) SELECT key
139 VKEY_SELECT
= VK_SELECT
,
141 // VKEY_PRINT (2A) PRINT key
142 VKEY_PRINT
= VK_PRINT
,
144 // VKEY_EXECUTE (2B) EXECUTE key
145 VKEY_EXECUTE
= VK_EXECUTE
,
147 // VKEY_SNAPSHOT (2C) PRINT SCREEN key
148 VKEY_SNAPSHOT
= VK_SNAPSHOT
,
150 // VKEY_INSERT (2D) INS key
151 VKEY_INSERT
= VK_INSERT
,
153 // VKEY_DELETE (2E) DEL key
154 VKEY_DELETE
= VK_DELETE
,
156 // VKEY_HELP (2F) HELP key
268 // VKEY_LWIN (5B) Left Windows key (Microsoft Natural keyboard)
271 // VKEY_RWIN (5C) Right Windows key (Natural keyboard)
274 // VKEY_APPS (5D) Applications key (Natural keyboard)
277 // VKEY_SLEEP (5F) Computer Sleep key
278 VKEY_SLEEP
= VK_SLEEP
,
280 // VKEY_NUMPAD0 (60) Numeric keypad 0 key
281 VKEY_NUMPAD0
= VK_NUMPAD0
,
283 // VKEY_NUMPAD1 (61) Numeric keypad 1 key
284 VKEY_NUMPAD1
= VK_NUMPAD1
,
286 // VKEY_NUMPAD2 (62) Numeric keypad 2 key
287 VKEY_NUMPAD2
= VK_NUMPAD2
,
289 // VKEY_NUMPAD3 (63) Numeric keypad 3 key
290 VKEY_NUMPAD3
= VK_NUMPAD3
,
292 // VKEY_NUMPAD4 (64) Numeric keypad 4 key
293 VKEY_NUMPAD4
= VK_NUMPAD4
,
295 // VKEY_NUMPAD5 (65) Numeric keypad 5 key
296 VKEY_NUMPAD5
= VK_NUMPAD5
,
298 // VKEY_NUMPAD6 (66) Numeric keypad 6 key
299 VKEY_NUMPAD6
= VK_NUMPAD6
,
301 // VKEY_NUMPAD7 (67) Numeric keypad 7 key
302 VKEY_NUMPAD7
= VK_NUMPAD7
,
304 // VKEY_NUMPAD8 (68) Numeric keypad 8 key
305 VKEY_NUMPAD8
= VK_NUMPAD8
,
307 // VKEY_NUMPAD9 (69) Numeric keypad 9 key
308 VKEY_NUMPAD9
= VK_NUMPAD9
,
310 // VKEY_MULTIPLY (6A) Multiply key
311 VKEY_MULTIPLY
= VK_MULTIPLY
,
313 // VKEY_ADD (6B) Add key
316 // VKEY_SEPARATOR (6C) Separator key
317 VKEY_SEPARATOR
= VK_SEPARATOR
,
319 // VKEY_SUBTRACT (6D) Subtract key
320 VKEY_SUBTRACT
= VK_SUBTRACT
,
322 // VKEY_DECIMAL (6E) Decimal key
323 VKEY_DECIMAL
= VK_DECIMAL
,
325 // VKEY_DIVIDE (6F) Divide key
326 VKEY_DIVIDE
= VK_DIVIDE
,
328 // VKEY_F1 (70) F1 key
331 // VKEY_F2 (71) F2 key
334 // VKEY_F3 (72) F3 key
337 // VKEY_F4 (73) F4 key
340 // VKEY_F5 (74) F5 key
343 // VKEY_F6 (75) F6 key
346 // VKEY_F7 (76) F7 key
349 // VKEY_F8 (77) F8 key
352 // VKEY_F9 (78) F9 key
355 // VKEY_F10 (79) F10 key
358 // VKEY_F11 (7A) F11 key
361 // VKEY_F12 (7B) F12 key
364 // VKEY_F13 (7C) F13 key
367 // VKEY_F14 (7D) F14 key
370 // VKEY_F15 (7E) F15 key
373 // VKEY_F16 (7F) F16 key
376 // VKEY_F17 (80H) F17 key
379 // VKEY_F18 (81H) F18 key
382 // VKEY_F19 (82H) F19 key
385 // VKEY_F20 (83H) F20 key
388 // VKEY_F21 (84H) F21 key
391 // VKEY_F22 (85H) F22 key
394 // VKEY_F23 (86H) F23 key
397 // VKEY_F24 (87H) F24 key
400 // VKEY_NUMLOCK (90) NUM LOCK key
401 VKEY_NUMLOCK
= VK_NUMLOCK
,
403 // VKEY_SCROLL (91) SCROLL LOCK key
404 VKEY_SCROLL
= VK_SCROLL
,
406 // VKEY_LSHIFT (A0) Left SHIFT key
407 VKEY_LSHIFT
= VK_LSHIFT
,
409 // VKEY_RSHIFT (A1) Right SHIFT key
410 VKEY_RSHIFT
= VK_RSHIFT
,
412 // VKEY_LCONTROL (A2) Left CONTROL key
413 VKEY_LCONTROL
= VK_LCONTROL
,
415 // VKEY_RCONTROL (A3) Right CONTROL key
416 VKEY_RCONTROL
= VK_RCONTROL
,
418 // VKEY_LMENU (A4) Left MENU key
419 VKEY_LMENU
= VK_LMENU
,
421 // VKEY_RMENU (A5) Right MENU key
422 VKEY_RMENU
= VK_RMENU
,
424 // VKEY_BROWSER_BACK (A6) Windows 2000/XP: Browser Back key
425 VKEY_BROWSER_BACK
= VK_BROWSER_BACK
,
427 // VKEY_BROWSER_FORWARD (A7) Windows 2000/XP: Browser Forward key
428 VKEY_BROWSER_FORWARD
= VK_BROWSER_FORWARD
,
430 // VKEY_BROWSER_REFRESH (A8) Windows 2000/XP: Browser Refresh key
431 VKEY_BROWSER_REFRESH
= VK_BROWSER_REFRESH
,
433 // VKEY_BROWSER_STOP (A9) Windows 2000/XP: Browser Stop key
434 VKEY_BROWSER_STOP
= VK_BROWSER_STOP
,
436 // VKEY_BROWSER_SEARCH (AA) Windows 2000/XP: Browser Search key
437 VKEY_BROWSER_SEARCH
= VK_BROWSER_SEARCH
,
439 // VKEY_BROWSER_FAVORITES (AB) Windows 2000/XP: Browser Favorites key
440 VKEY_BROWSER_FAVORITES
= VK_BROWSER_FAVORITES
,
442 // VKEY_BROWSER_HOME (AC) Windows 2000/XP: Browser Start and Home key
443 VKEY_BROWSER_HOME
= VK_BROWSER_HOME
,
445 // VKEY_VOLUME_MUTE (AD) Windows 2000/XP: Volume Mute key
446 VKEY_VOLUME_MUTE
= VK_VOLUME_MUTE
,
448 // VKEY_VOLUME_DOWN (AE) Windows 2000/XP: Volume Down key
449 VKEY_VOLUME_DOWN
= VK_VOLUME_DOWN
,
451 // VKEY_VOLUME_UP (AF) Windows 2000/XP: Volume Up key
452 VKEY_VOLUME_UP
= VK_VOLUME_UP
,
454 // VKEY_MEDIA_NEXT_TRACK (B0) Windows 2000/XP: Next Track key
455 VKEY_MEDIA_NEXT_TRACK
= VK_MEDIA_NEXT_TRACK
,
457 // VKEY_MEDIA_PREV_TRACK (B1) Windows 2000/XP: Previous Track key
458 VKEY_MEDIA_PREV_TRACK
= VK_MEDIA_PREV_TRACK
,
460 // VKEY_MEDIA_STOP (B2) Windows 2000/XP: Stop Media key
461 VKEY_MEDIA_STOP
= VK_MEDIA_STOP
,
463 // VKEY_MEDIA_PLAY_PAUSE (B3) Windows 2000/XP: Play/Pause Media key
464 VKEY_MEDIA_PLAY_PAUSE
= VK_MEDIA_PLAY_PAUSE
,
466 // VKEY_LAUNCH_MAIL (B4) Windows 2000/XP: Start Mail key
467 VKEY_MEDIA_LAUNCH_MAIL
= 0xB4,
469 // VKEY_LAUNCH_MEDIA_SELECT (B5) Windows 2000/XP: Select Media key
470 VKEY_MEDIA_LAUNCH_MEDIA_SELECT
= 0xB5,
472 // VKEY_LAUNCH_APP1 (B6) Windows 2000/XP: Start Application 1 key
473 VKEY_MEDIA_LAUNCH_APP1
= 0xB6,
475 // VKEY_LAUNCH_APP2 (B7) Windows 2000/XP: Start Application 2 key
476 VKEY_MEDIA_LAUNCH_APP2
= 0xB7,
478 // VKEY_OEM_1 (BA) Used for miscellaneous characters, it can vary by keyboard. Windows 2000/XP: For the US standard keyboard, the ',:' key
479 VKEY_OEM_1
= VK_OEM_1
,
481 // VKEY_OEM_PLUS (BB) Windows 2000/XP: For any country/region, the '+' key
482 VKEY_OEM_PLUS
= VK_OEM_PLUS
,
484 // VKEY_OEM_COMMA (BC) Windows 2000/XP: For any country/region, the ',' key
485 VKEY_OEM_COMMA
= VK_OEM_COMMA
,
487 // VKEY_OEM_MINUS (BD) Windows 2000/XP: For any country/region, the '-' key
488 VKEY_OEM_MINUS
= VK_OEM_MINUS
,
490 // VKEY_OEM_PERIOD (BE) Windows 2000/XP: For any country/region, the '.' key
491 VKEY_OEM_PERIOD
= VK_OEM_PERIOD
,
493 // VKEY_OEM_2 (BF) Used for miscellaneous characters, it can vary by keyboard. Windows 2000/XP: For the US standard keyboard, the '/?' key
494 VKEY_OEM_2
= VK_OEM_2
,
496 // VKEY_OEM_3 (C0) Used for miscellaneous characters, it can vary by keyboard. Windows 2000/XP: For the US standard keyboard, the '`~' key
497 VKEY_OEM_3
= VK_OEM_3
,
499 // VKEY_OEM_4 (DB) Used for miscellaneous characters, it can vary by keyboard. Windows 2000/XP: For the US standard keyboard, the '[{' key
500 VKEY_OEM_4
= VK_OEM_4
,
502 // VKEY_OEM_5 (DC) Used for miscellaneous characters, it can vary by keyboard. Windows 2000/XP: For the US standard keyboard, the '\|' key
503 VKEY_OEM_5
= VK_OEM_5
,
505 // VKEY_OEM_6 (DD) Used for miscellaneous characters, it can vary by keyboard. Windows 2000/XP: For the US standard keyboard, the ']}' key
506 VKEY_OEM_6
= VK_OEM_6
,
508 // 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
509 VKEY_OEM_7
= VK_OEM_7
,
511 // VKEY_OEM_8 (DF) Used for miscellaneous characters, it can vary by keyboard.
512 VKEY_OEM_8
= VK_OEM_8
,
514 // VKEY_OEM_102 (E2) Windows 2000/XP: Either the angle bracket key or the backslash key on the RT 102-key keyboard
515 VKEY_OEM_102
= VK_OEM_102
,
517 // VKEY_OEM_103 (E3) GTV KEYCODE_MEDIA_REWIND
520 // VKEY_OEM_104 (E4) GTV KEYCODE_MEDIA_FAST_FORWARD
523 // VKEY_PROCESSKEY (E5) Windows 95/98/Me, Windows NT 4.0, Windows 2000/XP: IME PROCESS key
524 VKEY_PROCESSKEY
= VK_PROCESSKEY
,
526 // 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
527 VKEY_PACKET
= VK_PACKET
,
529 // VKEY_ATTN (F6) Attn key
532 // VKEY_CRSEL (F7) CrSel key
533 VKEY_CRSEL
= VK_CRSEL
,
535 // VKEY_EXSEL (F8) ExSel key
536 VKEY_EXSEL
= VK_EXSEL
,
538 // VKEY_EREOF (F9) Erase EOF key
539 VKEY_EREOF
= VK_EREOF
,
541 // VKEY_PLAY (FA) Play key
544 // VKEY_ZOOM (FB) Zoom key
547 // VKEY_NONAME (FC) Reserved for future use
548 VKEY_NONAME
= VK_NONAME
,
550 // VKEY_PA1 (FD) PA1 key
553 // VKEY_OEM_CLEAR (FE) Clear key
554 VKEY_OEM_CLEAR
= VK_OEM_CLEAR
,