@vscodium/native-keymap 3.3.7-258412

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. package/.nvmrc +1 -0
  2. package/.release-it.yml +8 -0
  3. package/LICENSE +22 -0
  4. package/README.md +82 -0
  5. package/ThirdPartyNotices.txt +42 -0
  6. package/binding.gyp +92 -0
  7. package/collected-artifacts/native-keymap-darwin-arm64/native-keymap-3.3.7-258412-darwin-arm64.tar.gz +0 -0
  8. package/collected-artifacts/native-keymap-darwin-arm64/native-keymap-3.3.7-258412-darwin-arm64.tar.gz.sha256 +1 -0
  9. package/collected-artifacts/native-keymap-darwin-x64/native-keymap-3.3.7-258412-darwin-x64.tar.gz +0 -0
  10. package/collected-artifacts/native-keymap-darwin-x64/native-keymap-3.3.7-258412-darwin-x64.tar.gz.sha256 +1 -0
  11. package/collected-artifacts/native-keymap-linux-arm64/native-keymap-3.3.7-258412-linux-arm64.tar.gz +0 -0
  12. package/collected-artifacts/native-keymap-linux-arm64/native-keymap-3.3.7-258412-linux-arm64.tar.gz.sha256 +1 -0
  13. package/collected-artifacts/native-keymap-linux-armhf/native-keymap-3.3.7-258412-linux-armhf.tar.gz +0 -0
  14. package/collected-artifacts/native-keymap-linux-armhf/native-keymap-3.3.7-258412-linux-armhf.tar.gz.sha256 +1 -0
  15. package/collected-artifacts/native-keymap-linux-loong64/native-keymap-3.3.7-258412-linux-loong64.tar.gz +0 -0
  16. package/collected-artifacts/native-keymap-linux-loong64/native-keymap-3.3.7-258412-linux-loong64.tar.gz.sha256 +1 -0
  17. package/collected-artifacts/native-keymap-linux-ppc64le/native-keymap-3.3.7-258412-linux-ppc64le.tar.gz +0 -0
  18. package/collected-artifacts/native-keymap-linux-ppc64le/native-keymap-3.3.7-258412-linux-ppc64le.tar.gz.sha256 +1 -0
  19. package/collected-artifacts/native-keymap-linux-riscv64/native-keymap-3.3.7-258412-linux-riscv64.tar.gz +0 -0
  20. package/collected-artifacts/native-keymap-linux-riscv64/native-keymap-3.3.7-258412-linux-riscv64.tar.gz.sha256 +1 -0
  21. package/collected-artifacts/native-keymap-linux-s390x/native-keymap-3.3.7-258412-linux-s390x.tar.gz +0 -0
  22. package/collected-artifacts/native-keymap-linux-s390x/native-keymap-3.3.7-258412-linux-s390x.tar.gz.sha256 +1 -0
  23. package/collected-artifacts/native-keymap-linux-x64/native-keymap-3.3.7-258412-linux-x64.tar.gz +0 -0
  24. package/collected-artifacts/native-keymap-linux-x64/native-keymap-3.3.7-258412-linux-x64.tar.gz.sha256 +1 -0
  25. package/collected-artifacts/native-keymap-win32-arm64/native-keymap-3.3.7-258412-win32-arm64.tar.gz +0 -0
  26. package/collected-artifacts/native-keymap-win32-arm64/native-keymap-3.3.7-258412-win32-arm64.tar.gz.sha256 +1 -0
  27. package/collected-artifacts/native-keymap-win32-x64/native-keymap-3.3.7-258412-win32-x64.tar.gz +0 -0
  28. package/collected-artifacts/native-keymap-win32-x64/native-keymap-3.3.7-258412-win32-x64.tar.gz.sha256 +1 -0
  29. package/deps/chromium/dom_code_data.inc +618 -0
  30. package/deps/chromium/keyboard_codes.h +23 -0
  31. package/deps/chromium/macros.h +32 -0
  32. package/deps/chromium/x/keysym_to_unicode.cc +896 -0
  33. package/deps/chromium/x/keysym_to_unicode.h +26 -0
  34. package/index.d.ts +70 -0
  35. package/index.js +70 -0
  36. package/package.json +25 -0
  37. package/release/native-keymap-3.3.7-258412-darwin-arm64.tar.gz +0 -0
  38. package/release/native-keymap-3.3.7-258412-darwin-arm64.tar.gz.sha256 +1 -0
  39. package/release/native-keymap-3.3.7-258412-darwin-x64.tar.gz +0 -0
  40. package/release/native-keymap-3.3.7-258412-darwin-x64.tar.gz.sha256 +1 -0
  41. package/release/native-keymap-3.3.7-258412-linux-arm64.tar.gz +0 -0
  42. package/release/native-keymap-3.3.7-258412-linux-arm64.tar.gz.sha256 +1 -0
  43. package/release/native-keymap-3.3.7-258412-linux-armhf.tar.gz +0 -0
  44. package/release/native-keymap-3.3.7-258412-linux-armhf.tar.gz.sha256 +1 -0
  45. package/release/native-keymap-3.3.7-258412-linux-loong64.tar.gz +0 -0
  46. package/release/native-keymap-3.3.7-258412-linux-loong64.tar.gz.sha256 +1 -0
  47. package/release/native-keymap-3.3.7-258412-linux-ppc64le.tar.gz +0 -0
  48. package/release/native-keymap-3.3.7-258412-linux-ppc64le.tar.gz.sha256 +1 -0
  49. package/release/native-keymap-3.3.7-258412-linux-riscv64.tar.gz +0 -0
  50. package/release/native-keymap-3.3.7-258412-linux-riscv64.tar.gz.sha256 +1 -0
  51. package/release/native-keymap-3.3.7-258412-linux-s390x.tar.gz +0 -0
  52. package/release/native-keymap-3.3.7-258412-linux-s390x.tar.gz.sha256 +1 -0
  53. package/release/native-keymap-3.3.7-258412-linux-x64.tar.gz +0 -0
  54. package/release/native-keymap-3.3.7-258412-linux-x64.tar.gz.sha256 +1 -0
  55. package/release/native-keymap-3.3.7-258412-win32-arm64.tar.gz +0 -0
  56. package/release/native-keymap-3.3.7-258412-win32-arm64.tar.gz.sha256 +1 -0
  57. package/release/native-keymap-3.3.7-258412-win32-x64.tar.gz +0 -0
  58. package/release/native-keymap-3.3.7-258412-win32-x64.tar.gz.sha256 +1 -0
  59. package/src/common.h +92 -0
  60. package/src/keyboard_mac.mm +209 -0
  61. package/src/keyboard_win.cc +476 -0
  62. package/src/keyboard_x.cc +407 -0
  63. package/src/keymapping.cc +147 -0
  64. package/src/keymapping.h +65 -0
  65. package/src/string_conversion.cc +67 -0
  66. package/src/string_conversion.h +18 -0
@@ -0,0 +1,618 @@
1
+ // ----------------------------------------------------------------------------------------------------------------
2
+ //
3
+ // [13.01.2022] https://source.chromium.org/chromium/chromium/src/+/main:ui/events/keycodes/dom/dom_code_data.inc
4
+ //
5
+ // ----------------------------------------------------------------------------------------------------------------
6
+
7
+ // Copyright 2013 The Chromium Authors. All rights reserved.
8
+ // Use of this source code is governed by a BSD-style license that can be
9
+ // found in the LICENSE file.
10
+
11
+ // This file has no header guard because it is explicitly intended
12
+ // to be included more than once with different definitions of the
13
+ // macros DOM_CODE and DOM_CODE_DECLARATION.
14
+
15
+ // Data in this file was created by referencing:
16
+ // [0] USB HID Usage Tables,
17
+ // http://www.usb.org/developers/hidpage/Hut1_12v2.pdf
18
+ // [1] DOM Level 3 KeyboardEvent code Values,
19
+ // http://www.w3.org/TR/uievents-code/
20
+ // [2] OS X <HIToolbox/Events.h>
21
+ // [3] Linux <linux/input.h> and hid-input.c
22
+ // [4] USB HID to PS/2 Scan Code Translation Table
23
+ // http://download.microsoft.com/download/1/6/1/161ba512-40e2-4cc9-843a-923143f3456c/translate.pdf
24
+ // [5] Keyboard Scan Code Specification
25
+ // http://download.microsoft.com/download/1/6/1/161ba512-40e2-4cc9-843a-923143f3456c/scancode.doc
26
+
27
+ // General notes:
28
+ //
29
+ // This table provides the definition of ui::DomCode (UI Events |code|) values
30
+ // as well as mapping between scan codes and DomCode. Some entries have no
31
+ // defined scan codes; these are present only to allow those UI Events |code|
32
+ // strings to be represented by DomCode. A few have a null code; these define
33
+ // mappings with a DomCode:: value but no |code| string, typically because
34
+ // they end up used in shortcuts but not standardized in UI Events; e.g.
35
+ // DomCode::BRIGHTNESS_UP. Commented-out entries document USB codes that are
36
+ // potentially interesting but not currently used.
37
+
38
+ // Linux notes:
39
+ //
40
+ // All USB codes that are listed here and that are supported by the kernel
41
+ // (as of 4.2) have their evdev/xkb scan codes recorded; if an evdev/xkb
42
+ // code is 0, it is because the kernel USB driver does not handle that key.
43
+ //
44
+ // Some Linux kernel mappings for USB keys may seem counterintuitive:
45
+ //
46
+ // [L1] Although evdev 0x163 KEY_CLEAR exists, Linux does not use it
47
+ // for any USB keys. Linux maps USB 0x07009c [Keyboard Clear] and
48
+ // 0x0700d8 [Keypad Clear] to KEY_DELETE "Delete", so those codes are
49
+ // not distinguishable by applications, and UI Events "NumpadClear"
50
+ // is therefore not supported. USB 0x0700A2 [Keyboard Clear/Again]
51
+ // is not mapped by the kernel at all.
52
+ //
53
+ // [L2] 'Menu' and 'Props' naming differs between evdev and USB / UI Events.
54
+ // USB 0x010085 [System Main Menu] and USB 0x0C0040 [Menu Mode] both
55
+ // map to evdev 0x8B KEY_MENU (which has no corresponding UI Events
56
+ // |code|). USB 0x070076 [Keyboard Menu] does not map to KEY_MENU;
57
+ // it maps to evdev 0x82 KEY_PROPS, which is not the same as USB and
58
+ // UI Events "Props". USB 0x0700A3 [Props], which does correspond to
59
+ // UI Events "Props", is not mapped by the kernel. (And all of these
60
+ // are distinct from UI Events' "ContextMenu", which corresponds to
61
+ // USB 0x070065 [Keyboard Application] via evdev 0x7F KEY_COMPOSE,
62
+ // following Windows convention.)
63
+
64
+ // Windows notes:
65
+ //
66
+ // The set of scan codes supported here may not be complete.
67
+ //
68
+ // [W1] Windows maps both USB 0x070094 [Lang5] and USB 0x070073 [F24] to the
69
+ // same scan code, 0x76. (Microsoft's defined scan codes for F13 - F24
70
+ // appear to be the result of accidentally mapping an IBM Set 3 terminal
71
+ // keyboard, rather than an IBM Set 2 PC keyboard, through the BIOS
72
+ // 2-to-1 table.) We map 0x76 to F24 here, since Lang5 appears unused
73
+ // in practice (its declared function, Zenkaku/Hankaku switch, is
74
+ // conventionally placed on Backquote by Japanese keyboards).
75
+
76
+ // Macintosh notes:
77
+ //
78
+ // The set of scan codes supported here may not be complete.
79
+ //
80
+ // [M1] OS X maps USB 0x070049 [Insert] as well as USB 0x070075 [Help] to
81
+ // scan code 0x72 kVK_Help. We map this to UI Events 'Insert', since
82
+ // Apple keyboards with USB 0x070049 [Insert] labelled "Help" have not
83
+ // been made since 2007.
84
+
85
+ // ChromeOS notes:
86
+ //
87
+ // Any keys that are added or updated specifically for use in the ChromeOS
88
+ // top-row should also be updated in sections of Input Diagnostics:
89
+ // ash/webui/diagnostics_ui/mojom/input_data_provider.mojom: enum TopRowKey
90
+ // ash/webui/diagnostics_ui/backend/input_data_provider_keyboard.cc: kScancodeMapping
91
+
92
+ DOM_CODE_DECLARATION {
93
+
94
+ // USB evdev XKB Win Mac Code
95
+ DOM_CODE(0x000000, 0x0000, 0x0000, 0x0000, 0xffff, NULL, NONE), // Invalid
96
+
97
+ // =========================================
98
+ // Non-USB codes
99
+ // =========================================
100
+
101
+ // USB evdev XKB Win Mac Code
102
+ DOM_CODE(0x000010, 0x0000, 0x0000, 0x0000, 0xffff, "Hyper", HYPER),
103
+ DOM_CODE(0x000011, 0x0000, 0x0000, 0x0000, 0xffff, "Super", SUPER),
104
+ DOM_CODE(0x000012, 0x0000, 0x0000, 0x0000, 0xffff, "Fn", FN),
105
+ DOM_CODE(0x000013, 0x0000, 0x0000, 0x0000, 0xffff, "FnLock", FN_LOCK),
106
+ DOM_CODE(0x000014, 0x0000, 0x0000, 0x0000, 0xffff, "Suspend", SUSPEND),
107
+ DOM_CODE(0x000015, 0x0000, 0x0000, 0x0000, 0xffff, "Resume", RESUME),
108
+ DOM_CODE(0x000016, 0x0000, 0x0000, 0x0000, 0xffff, "Turbo", TURBO),
109
+ // TODO(b/146683484): HID usage for privacy screen control is not yet
110
+ // approved. Once it is update the code here.
111
+ // TODO(https://crbug.com/952051): Privacy screen will not have a DOM |code|
112
+ // name defined as it is not exposed to web content.
113
+ DOM_CODE(0x000017, 0x0279, 0x0281, 0x0000, 0xffff, "PrivacyScreenToggle",
114
+ PRIVACY_SCREEN_TOGGLE), // Privacy Screen Toggle
115
+ // As with privacy screen, microphone mute toggle will not be exposed to web
116
+ // content.
117
+ DOM_CODE(0x000018, 0x00f8, 0x0100, 0x0000, 0xffff, "MicrophoneMuteToggle",
118
+ MICROPHONE_MUTE_TOGGLE), // Microphone Mute Toggle
119
+ // As with privacy screen, keyboard backlight toggle will not be exposed to web
120
+ // content.
121
+ DOM_CODE(0x000019, 0x00e4, 0x00ec, 0x0000, 0xffff, "KeyboardBacklightToggle",
122
+ KEYBOARD_BACKLIGHT_TOGGLE), // Keyboard Backlight Toggle
123
+
124
+ // =========================================
125
+ // USB Usage Page 0x01: Generic Desktop Page
126
+ // =========================================
127
+
128
+ // Sleep could be encoded as USB#0c0032, but there's no corresponding WakeUp
129
+ // in the 0x0c USB page.
130
+ // USB evdev XKB Win Mac
131
+ DOM_CODE(0x010082, 0x008e, 0x0096, 0xe05f, 0xffff, "Sleep", SLEEP), // SystemSleep
132
+ DOM_CODE(0x010083, 0x008f, 0x0097, 0xe063, 0xffff, "WakeUp", WAKE_UP),
133
+ DOM_CODE(0x0100b5, 0x00e3, 0x00eb, 0x0000, 0xffff, "DisplayToggleIntExt",
134
+ DISPLAY_TOGGLE_INT_EXT), // System Display Toggle Int/Ext
135
+
136
+
137
+ // =========================================
138
+ // USB Usage Page 0x07: Keyboard/Keypad Page
139
+ // =========================================
140
+
141
+ // TODO(garykac):
142
+ // XKB#005c ISO Level3 Shift (AltGr)
143
+ // XKB#005e <>||
144
+ // XKB#006d Linefeed
145
+ // XKB#008a SunProps cf. USB#0700a3 CrSel/Props
146
+ // XKB#008e SunOpen
147
+ // Mac#003f kVK_Function
148
+ // Mac#000a kVK_ISO_Section (ISO keyboards only)
149
+ // Mac#0066 kVK_JIS_Eisu (USB#07008a Henkan?)
150
+
151
+ // USB evdev XKB Win Mac
152
+ DOM_CODE(0x070000, 0x0000, 0x0000, 0x0000, 0xffff, NULL, USB_RESERVED),
153
+ DOM_CODE(0x070001, 0x0000, 0x0000, 0x00ff, 0xffff, NULL, USB_ERROR_ROLL_OVER),
154
+ DOM_CODE(0x070002, 0x0000, 0x0000, 0x00fc, 0xffff, NULL, USB_POST_FAIL),
155
+ DOM_CODE(0x070003, 0x0000, 0x0000, 0x0000, 0xffff, NULL, USB_ERROR_UNDEFINED),
156
+ DOM_CODE(0x070004, 0x001e, 0x0026, 0x001e, 0x0000, "KeyA", US_A), // aA
157
+ DOM_CODE(0x070005, 0x0030, 0x0038, 0x0030, 0x000b, "KeyB", US_B), // bB
158
+ DOM_CODE(0x070006, 0x002e, 0x0036, 0x002e, 0x0008, "KeyC", US_C), // cC
159
+ DOM_CODE(0x070007, 0x0020, 0x0028, 0x0020, 0x0002, "KeyD", US_D), // dD
160
+
161
+ DOM_CODE(0x070008, 0x0012, 0x001a, 0x0012, 0x000e, "KeyE", US_E), // eE
162
+ DOM_CODE(0x070009, 0x0021, 0x0029, 0x0021, 0x0003, "KeyF", US_F), // fF
163
+ DOM_CODE(0x07000a, 0x0022, 0x002a, 0x0022, 0x0005, "KeyG", US_G), // gG
164
+ DOM_CODE(0x07000b, 0x0023, 0x002b, 0x0023, 0x0004, "KeyH", US_H), // hH
165
+ DOM_CODE(0x07000c, 0x0017, 0x001f, 0x0017, 0x0022, "KeyI", US_I), // iI
166
+ DOM_CODE(0x07000d, 0x0024, 0x002c, 0x0024, 0x0026, "KeyJ", US_J), // jJ
167
+ DOM_CODE(0x07000e, 0x0025, 0x002d, 0x0025, 0x0028, "KeyK", US_K), // kK
168
+ DOM_CODE(0x07000f, 0x0026, 0x002e, 0x0026, 0x0025, "KeyL", US_L), // lL
169
+
170
+ DOM_CODE(0x070010, 0x0032, 0x003a, 0x0032, 0x002e, "KeyM", US_M), // mM
171
+ DOM_CODE(0x070011, 0x0031, 0x0039, 0x0031, 0x002d, "KeyN", US_N), // nN
172
+ DOM_CODE(0x070012, 0x0018, 0x0020, 0x0018, 0x001f, "KeyO", US_O), // oO
173
+ DOM_CODE(0x070013, 0x0019, 0x0021, 0x0019, 0x0023, "KeyP", US_P), // pP
174
+ DOM_CODE(0x070014, 0x0010, 0x0018, 0x0010, 0x000c, "KeyQ", US_Q), // qQ
175
+ DOM_CODE(0x070015, 0x0013, 0x001b, 0x0013, 0x000f, "KeyR", US_R), // rR
176
+ DOM_CODE(0x070016, 0x001f, 0x0027, 0x001f, 0x0001, "KeyS", US_S), // sS
177
+ DOM_CODE(0x070017, 0x0014, 0x001c, 0x0014, 0x0011, "KeyT", US_T), // tT
178
+
179
+ DOM_CODE(0x070018, 0x0016, 0x001e, 0x0016, 0x0020, "KeyU", US_U), // uU
180
+ DOM_CODE(0x070019, 0x002f, 0x0037, 0x002f, 0x0009, "KeyV", US_V), // vV
181
+ DOM_CODE(0x07001a, 0x0011, 0x0019, 0x0011, 0x000d, "KeyW", US_W), // wW
182
+ DOM_CODE(0x07001b, 0x002d, 0x0035, 0x002d, 0x0007, "KeyX", US_X), // xX
183
+ DOM_CODE(0x07001c, 0x0015, 0x001d, 0x0015, 0x0010, "KeyY", US_Y), // yY
184
+ DOM_CODE(0x07001d, 0x002c, 0x0034, 0x002c, 0x0006, "KeyZ", US_Z), // zZ
185
+ DOM_CODE(0x07001e, 0x0002, 0x000a, 0x0002, 0x0012, "Digit1", DIGIT1), // 1!
186
+ DOM_CODE(0x07001f, 0x0003, 0x000b, 0x0003, 0x0013, "Digit2", DIGIT2), // 2@
187
+
188
+ DOM_CODE(0x070020, 0x0004, 0x000c, 0x0004, 0x0014, "Digit3", DIGIT3), // 3#
189
+ DOM_CODE(0x070021, 0x0005, 0x000d, 0x0005, 0x0015, "Digit4", DIGIT4), // 4$
190
+ DOM_CODE(0x070022, 0x0006, 0x000e, 0x0006, 0x0017, "Digit5", DIGIT5), // 5%
191
+ DOM_CODE(0x070023, 0x0007, 0x000f, 0x0007, 0x0016, "Digit6", DIGIT6), // 6^
192
+ DOM_CODE(0x070024, 0x0008, 0x0010, 0x0008, 0x001a, "Digit7", DIGIT7), // 7&
193
+ DOM_CODE(0x070025, 0x0009, 0x0011, 0x0009, 0x001c, "Digit8", DIGIT8), // 8*
194
+ DOM_CODE(0x070026, 0x000a, 0x0012, 0x000a, 0x0019, "Digit9", DIGIT9), // 9(
195
+ DOM_CODE(0x070027, 0x000b, 0x0013, 0x000b, 0x001d, "Digit0", DIGIT0), // 0)
196
+
197
+ DOM_CODE(0x070028, 0x001c, 0x0024, 0x001c, 0x0024, "Enter", ENTER),
198
+ DOM_CODE(0x070029, 0x0001, 0x0009, 0x0001, 0x0035, "Escape", ESCAPE),
199
+ DOM_CODE(0x07002a, 0x000e, 0x0016, 0x000e, 0x0033, "Backspace", BACKSPACE),
200
+ DOM_CODE(0x07002b, 0x000f, 0x0017, 0x000f, 0x0030, "Tab", TAB),
201
+ DOM_CODE(0x07002c, 0x0039, 0x0041, 0x0039, 0x0031, "Space", SPACE), // Spacebar
202
+ DOM_CODE(0x07002d, 0x000c, 0x0014, 0x000c, 0x001b, "Minus", MINUS), // -_
203
+ DOM_CODE(0x07002e, 0x000d, 0x0015, 0x000d, 0x0018, "Equal", EQUAL), // =+
204
+ DOM_CODE(0x07002f, 0x001a, 0x0022, 0x001a, 0x0021, "BracketLeft", BRACKET_LEFT),
205
+
206
+ DOM_CODE(0x070030, 0x001b, 0x0023, 0x001b, 0x001e, "BracketRight", BRACKET_RIGHT),
207
+ DOM_CODE(0x070031, 0x002b, 0x0033, 0x002b, 0x002a, "Backslash", BACKSLASH), // \|
208
+ // USB#070032 never appears on keyboards that have USB#070031.
209
+ // Platforms use the same scancode as for the two keys.
210
+ // Hence this code can only be generated synthetically
211
+ // (e.g. in a DOM Level 3 KeyboardEvent).
212
+ // The keycap varies on international keyboards:
213
+ // Dan: '* Dutch: <> Ger: #' UK: #~
214
+ // TODO(garykac): Verify Mac intl keyboard.
215
+ //DOM_CODE(0x070032, 0x0000, 0x0000, 0x0000, 0xffff, NULL, INTL_HASH),
216
+ DOM_CODE(0x070033, 0x0027, 0x002f, 0x0027, 0x0029, "Semicolon", SEMICOLON), // ;:
217
+ DOM_CODE(0x070034, 0x0028, 0x0030, 0x0028, 0x0027, "Quote", QUOTE), // '"
218
+ DOM_CODE(0x070035, 0x0029, 0x0031, 0x0029, 0x0032, "Backquote", BACKQUOTE), // `~
219
+ DOM_CODE(0x070036, 0x0033, 0x003b, 0x0033, 0x002b, "Comma", COMMA), // ,<
220
+ DOM_CODE(0x070037, 0x0034, 0x003c, 0x0034, 0x002f, "Period", PERIOD), // .>
221
+
222
+ DOM_CODE(0x070038, 0x0035, 0x003d, 0x0035, 0x002c, "Slash", SLASH), // /?
223
+ // TODO(garykac): CapsLock requires special handling for each platform.
224
+ DOM_CODE(0x070039, 0x003a, 0x0042, 0x003a, 0x0039, "CapsLock", CAPS_LOCK),
225
+ DOM_CODE(0x07003a, 0x003b, 0x0043, 0x003b, 0x007a, "F1", F1),
226
+ DOM_CODE(0x07003b, 0x003c, 0x0044, 0x003c, 0x0078, "F2", F2),
227
+ DOM_CODE(0x07003c, 0x003d, 0x0045, 0x003d, 0x0063, "F3", F3),
228
+ DOM_CODE(0x07003d, 0x003e, 0x0046, 0x003e, 0x0076, "F4", F4),
229
+ DOM_CODE(0x07003e, 0x003f, 0x0047, 0x003f, 0x0060, "F5", F5),
230
+ DOM_CODE(0x07003f, 0x0040, 0x0048, 0x0040, 0x0061, "F6", F6),
231
+
232
+ DOM_CODE(0x070040, 0x0041, 0x0049, 0x0041, 0x0062, "F7", F7),
233
+ DOM_CODE(0x070041, 0x0042, 0x004a, 0x0042, 0x0064, "F8", F8),
234
+ DOM_CODE(0x070042, 0x0043, 0x004b, 0x0043, 0x0065, "F9", F9),
235
+ DOM_CODE(0x070043, 0x0044, 0x004c, 0x0044, 0x006d, "F10", F10),
236
+ DOM_CODE(0x070044, 0x0057, 0x005f, 0x0057, 0x0067, "F11", F11),
237
+ DOM_CODE(0x070045, 0x0058, 0x0060, 0x0058, 0x006f, "F12", F12),
238
+ // PrintScreen is effectively F13 on Mac OS X.
239
+ DOM_CODE(0x070046, 0x0063, 0x006b, 0xe037, 0xffff, "PrintScreen", PRINT_SCREEN),
240
+ DOM_CODE(0x070047, 0x0046, 0x004e, 0x0046, 0xffff, "ScrollLock", SCROLL_LOCK),
241
+
242
+ DOM_CODE(0x070048, 0x0077, 0x007f, 0x0045, 0xffff, "Pause", PAUSE),
243
+ // USB#0x070049 Insert, labeled "Help/Insert" on Mac -- see note M1 at top.
244
+ DOM_CODE(0x070049, 0x006e, 0x0076, 0xe052, 0x0072, "Insert", INSERT),
245
+ DOM_CODE(0x07004a, 0x0066, 0x006e, 0xe047, 0x0073, "Home", HOME),
246
+ DOM_CODE(0x07004b, 0x0068, 0x0070, 0xe049, 0x0074, "PageUp", PAGE_UP),
247
+ // Delete (Forward Delete) named DEL because DELETE conflicts with <windows.h>
248
+ DOM_CODE(0x07004c, 0x006f, 0x0077, 0xe053, 0x0075, "Delete", DEL),
249
+ DOM_CODE(0x07004d, 0x006b, 0x0073, 0xe04f, 0x0077, "End", END),
250
+ DOM_CODE(0x07004e, 0x006d, 0x0075, 0xe051, 0x0079, "PageDown", PAGE_DOWN),
251
+ DOM_CODE(0x07004f, 0x006a, 0x0072, 0xe04d, 0x007c, "ArrowRight", ARROW_RIGHT),
252
+
253
+ DOM_CODE(0x070050, 0x0069, 0x0071, 0xe04b, 0x007b, "ArrowLeft", ARROW_LEFT),
254
+ DOM_CODE(0x070051, 0x006c, 0x0074, 0xe050, 0x007d, "ArrowDown", ARROW_DOWN),
255
+ DOM_CODE(0x070052, 0x0067, 0x006f, 0xe048, 0x007e, "ArrowUp", ARROW_UP),
256
+ DOM_CODE(0x070053, 0x0045, 0x004d, 0xe045, 0x0047, "NumLock", NUM_LOCK),
257
+ DOM_CODE(0x070054, 0x0062, 0x006a, 0xe035, 0x004b, "NumpadDivide", NUMPAD_DIVIDE),
258
+ DOM_CODE(0x070055, 0x0037, 0x003f, 0x0037, 0x0043, "NumpadMultiply",
259
+ NUMPAD_MULTIPLY), // Keypad_*
260
+ DOM_CODE(0x070056, 0x004a, 0x0052, 0x004a, 0x004e, "NumpadSubtract",
261
+ NUMPAD_SUBTRACT), // Keypad_-
262
+ DOM_CODE(0x070057, 0x004e, 0x0056, 0x004e, 0x0045, "NumpadAdd", NUMPAD_ADD),
263
+
264
+ DOM_CODE(0x070058, 0x0060, 0x0068, 0xe01c, 0x004c, "NumpadEnter", NUMPAD_ENTER),
265
+ DOM_CODE(0x070059, 0x004f, 0x0057, 0x004f, 0x0053, "Numpad1", NUMPAD1), // +End
266
+ DOM_CODE(0x07005a, 0x0050, 0x0058, 0x0050, 0x0054, "Numpad2", NUMPAD2), // +Down
267
+ DOM_CODE(0x07005b, 0x0051, 0x0059, 0x0051, 0x0055, "Numpad3", NUMPAD3), // +PageDn
268
+ DOM_CODE(0x07005c, 0x004b, 0x0053, 0x004b, 0x0056, "Numpad4", NUMPAD4), // +Left
269
+ DOM_CODE(0x07005d, 0x004c, 0x0054, 0x004c, 0x0057, "Numpad5", NUMPAD5), //
270
+ DOM_CODE(0x07005e, 0x004d, 0x0055, 0x004d, 0x0058, "Numpad6", NUMPAD6), // +Right
271
+ DOM_CODE(0x07005f, 0x0047, 0x004f, 0x0047, 0x0059, "Numpad7", NUMPAD7), // +Home
272
+
273
+ DOM_CODE(0x070060, 0x0048, 0x0050, 0x0048, 0x005b, "Numpad8", NUMPAD8), // +Up
274
+ DOM_CODE(0x070061, 0x0049, 0x0051, 0x0049, 0x005c, "Numpad9", NUMPAD9), // +PageUp
275
+ DOM_CODE(0x070062, 0x0052, 0x005a, 0x0052, 0x0052, "Numpad0", NUMPAD0), // +Insert
276
+ DOM_CODE(0x070063, 0x0053, 0x005b, 0x0053, 0x0041, "NumpadDecimal",
277
+ NUMPAD_DECIMAL), // Keypad_. Delete
278
+ // USB#070064 is not present on US keyboard.
279
+ // This key is typically located near LeftShift key.
280
+ // The keycap varies on international keyboards:
281
+ // Dan: <> Dutch: ][ Ger: <> UK: \|
282
+ DOM_CODE(0x070064, 0x0056, 0x005e, 0x0056, 0x000a, "IntlBackslash", INTL_BACKSLASH),
283
+ // USB#0x070065 Application Menu (next to RWin key) -- see note L2 at top.
284
+ DOM_CODE(0x070065, 0x007f, 0x0087, 0xe05d, 0x006e, "ContextMenu", CONTEXT_MENU),
285
+ DOM_CODE(0x070066, 0x0074, 0x007c, 0xe05e, 0xffff, "Power", POWER),
286
+ DOM_CODE(0x070067, 0x0075, 0x007d, 0x0059, 0x0051, "NumpadEqual", NUMPAD_EQUAL),
287
+
288
+ DOM_CODE(0x070068, 0x00b7, 0x00bf, 0x0064, 0x0069, "F13", F13),
289
+ DOM_CODE(0x070069, 0x00b8, 0x00c0, 0x0065, 0x006b, "F14", F14),
290
+ DOM_CODE(0x07006a, 0x00b9, 0x00c1, 0x0066, 0x0071, "F15", F15),
291
+ DOM_CODE(0x07006b, 0x00ba, 0x00c2, 0x0067, 0x006a, "F16", F16),
292
+ DOM_CODE(0x07006c, 0x00bb, 0x00c3, 0x0068, 0x0040, "F17", F17),
293
+ DOM_CODE(0x07006d, 0x00bc, 0x00c4, 0x0069, 0x004f, "F18", F18),
294
+ DOM_CODE(0x07006e, 0x00bd, 0x00c5, 0x006a, 0x0050, "F19", F19),
295
+ DOM_CODE(0x07006f, 0x00be, 0x00c6, 0x006b, 0x005a, "F20", F20),
296
+
297
+ DOM_CODE(0x070070, 0x00bf, 0x00c7, 0x006c, 0xffff, "F21", F21),
298
+ DOM_CODE(0x070071, 0x00c0, 0x00c8, 0x006d, 0xffff, "F22", F22),
299
+ DOM_CODE(0x070072, 0x00c1, 0x00c9, 0x006e, 0xffff, "F23", F23),
300
+ // USB#0x070073 -- see note W1 at top.
301
+ DOM_CODE(0x070073, 0x00c2, 0x00ca, 0x0076, 0xffff, "F24", F24),
302
+ DOM_CODE(0x070074, 0x0086, 0x008e, 0x0000, 0xffff, "Open", OPEN), // Execute
303
+ // USB#0x070075 Help -- see note M1 at top.
304
+ DOM_CODE(0x070075, 0x008a, 0x0092, 0xe03b, 0xffff, "Help", HELP),
305
+ // USB#0x070076 Keyboard Menu -- see note L2 at top.
306
+ //DOM_CODE(0x070076, 0x0000, 0x0000, 0x0000, 0xffff, NULL, MENU), // Menu
307
+ DOM_CODE(0x070077, 0x0084, 0x008c, 0x0000, 0xffff, "Select", SELECT), // Select
308
+
309
+ //DOM_CODE(0x070078, 0x0080, 0x0088, 0x0000, 0xffff, NULL, STOP), // Stop
310
+ DOM_CODE(0x070079, 0x0081, 0x0089, 0x0000, 0xffff, "Again", AGAIN), // Again
311
+ DOM_CODE(0x07007a, 0x0083, 0x008b, 0xe008, 0xffff, "Undo", UNDO),
312
+ DOM_CODE(0x07007b, 0x0089, 0x0091, 0xe017, 0xffff, "Cut", CUT),
313
+ DOM_CODE(0x07007c, 0x0085, 0x008d, 0xe018, 0xffff, "Copy", COPY),
314
+ DOM_CODE(0x07007d, 0x0087, 0x008f, 0xe00a, 0xffff, "Paste", PASTE),
315
+ DOM_CODE(0x07007e, 0x0088, 0x0090, 0x0000, 0xffff, "Find", FIND), // Find
316
+ DOM_CODE(0x07007f, 0x0071, 0x0079, 0xe020, 0x004a, "AudioVolumeMute", VOLUME_MUTE),
317
+
318
+ DOM_CODE(0x070080, 0x0073, 0x007b, 0xe030, 0x0048, "AudioVolumeUp", VOLUME_UP),
319
+ DOM_CODE(0x070081, 0x0072, 0x007a, 0xe02e, 0x0049, "AudioVolumeDown", VOLUME_DOWN),
320
+ //DOM_CODE(0x070082, 0x0000, 0x0000, 0x0000, 0xffff, NULL, LOCKING_CAPS_LOCK),
321
+ //DOM_CODE(0x070083, 0x0000, 0x0000, 0x0000, 0xffff, NULL, LOCKING_NUM_LOCK),
322
+ //DOM_CODE(0x070084, 0x0000, 0x0000, 0x0000, 0xffff, NULL, LOCKING_SCROLL_LOCK),
323
+ DOM_CODE(0x070085, 0x0079, 0x0081, 0x007e, 0x005f, "NumpadComma", NUMPAD_COMMA),
324
+
325
+ // International1
326
+ // USB#070086 is used on AS/400 keyboards. Standard Keypad_= is USB#070067.
327
+ //DOM_CODE(0x070086, 0x0000, 0x0000, 0x0000, 0xffff, NULL, NUMPAD_EQUAL),
328
+ // USB#070087 is used for Brazilian /? and Japanese _ 'ro'.
329
+ DOM_CODE(0x070087, 0x0059, 0x0061, 0x0073, 0x005e, "IntlRo", INTL_RO),
330
+ // International2
331
+ // USB#070088 is used as Japanese Hiragana/Katakana key.
332
+ DOM_CODE(0x070088, 0x005d, 0x0065, 0x0070, 0xffff, "KanaMode", KANA_MODE),
333
+ // International3
334
+ // USB#070089 is used as Japanese Yen key.
335
+ DOM_CODE(0x070089, 0x007c, 0x0084, 0x007d, 0x005d, "IntlYen", INTL_YEN),
336
+ // International4
337
+ // USB#07008a is used as Japanese Henkan (Convert) key.
338
+ DOM_CODE(0x07008a, 0x005c, 0x0064, 0x0079, 0xffff, "Convert", CONVERT),
339
+ // International5
340
+ // USB#07008b is used as Japanese Muhenkan (No-convert) key.
341
+ DOM_CODE(0x07008b, 0x005e, 0x0066, 0x007b, 0xffff, "NonConvert", NON_CONVERT),
342
+ //DOM_CODE(0x07008c, 0x005f, 0x0067, 0x005c, 0xffff, NULL, INTERNATIONAL6),
343
+ //DOM_CODE(0x07008d, 0x0000, 0x0000, 0x0000, 0xffff, NULL, INTERNATIONAL7),
344
+ //DOM_CODE(0x07008e, 0x0000, 0x0000, 0x0000, 0xffff, NULL, INTERNATIONAL8),
345
+ //DOM_CODE(0x07008f, 0x0000, 0x0000, 0x0000, 0xffff, NULL, INTERNATIONAL9),
346
+
347
+ // LANG1
348
+ // USB#070090 is used as Korean Hangul/English toggle key, and as the Kana key
349
+ // on the Apple Japanese keyboard.
350
+ DOM_CODE(0x070090, 0x007a, 0x0082, 0x0072, 0x0068, "Lang1", LANG1),
351
+ // LANG2
352
+ // USB#070091 is used as Korean Hanja conversion key, and as the Eisu key on
353
+ // the Apple Japanese keyboard.
354
+ DOM_CODE(0x070091, 0x007b, 0x0083, 0x0071, 0x0066, "Lang2", LANG2),
355
+ // LANG3
356
+ // USB#070092 is used as Japanese Katakana key.
357
+ DOM_CODE(0x070092, 0x005a, 0x0062, 0x0078, 0xffff, "Lang3", LANG3),
358
+ // LANG4
359
+ // USB#070093 is used as Japanese Hiragana key.
360
+ DOM_CODE(0x070093, 0x005b, 0x0063, 0x0077, 0xffff, "Lang4", LANG4),
361
+ // LANG5
362
+ // USB#070094 is used as Japanese Zenkaku/Hankaku (Fullwidth/halfwidth) key.
363
+ // Not mapped on Windows -- see note W1 at top.
364
+ DOM_CODE(0x070094, 0x0055, 0x005d, 0x0000, 0xffff, "Lang5", LANG5),
365
+ //DOM_CODE(0x070095, 0x0000, 0x0000, 0x0000, 0xffff, NULL, LANG6), // LANG6
366
+ //DOM_CODE(0x070096, 0x0000, 0x0000, 0x0000, 0xffff, NULL, LANG7), // LANG7
367
+ //DOM_CODE(0x070097, 0x0000, 0x0000, 0x0000, 0xffff, NULL, LANG8), // LANG8
368
+ //DOM_CODE(0x070098, 0x0000, 0x0000, 0x0000, 0xffff, NULL, LANG9), // LANG9
369
+
370
+ //DOM_CODE(0x070099, 0x0000, 0x0000, 0x0000, 0xffff, NULL, ALTERNATE_ERASE),
371
+ //DOM_CODE(0x07009a, 0x0000, 0x0000, 0x0000, 0xffff, NULL, SYS_REQ), // /Attention
372
+ DOM_CODE(0x07009b, 0x0000, 0x0000, 0x0000, 0xffff, "Abort", ABORT), // Cancel
373
+ // USB#0x07009c Keyboard Clear -- see note L1 at top.
374
+ //DOM_CODE(0x07009c, 0x0000, 0x0000, 0x0000, 0xffff, NULL, CLEAR), // Clear
375
+ //DOM_CODE(0x07009d, 0x0000, 0x0000, 0x0000, 0xffff, NULL, PRIOR), // Prior
376
+ //DOM_CODE(0x07009e, 0x0000, 0x0000, 0x0000, 0xffff, NULL, RETURN), // Return
377
+ //DOM_CODE(0x07009f, 0x0000, 0x0000, 0x0000, 0xffff, NULL, SEPARATOR), // Separator
378
+
379
+ //DOM_CODE(0x0700a0, 0x0000, 0x0000, 0x0000, 0xffff, NULL, OUT), // Out
380
+ //DOM_CODE(0x0700a1, 0x0000, 0x0000, 0x0000, 0xffff, NULL, OPER), // Oper
381
+ //DOM_CODE(0x0700a2, 0x0000, 0x0000, 0x0000, 0xffff, NULL, CLEAR_AGAIN),
382
+ // USB#0x0700a3 Props -- see note L2 at top.
383
+ DOM_CODE(0x0700a3, 0x0000, 0x0000, 0x0000, 0xffff, "Props", PROPS), // CrSel/Props
384
+ //DOM_CODE(0x0700a4, 0x0000, 0x0000, 0x0000, 0xffff, NULL, EX_SEL), // ExSel
385
+
386
+ //DOM_CODE(0x0700b0, 0x0000, 0x0000, 0x0000, 0xffff, NULL, NUMPAD_00),
387
+ //DOM_CODE(0x0700b1, 0x0000, 0x0000, 0x0000, 0xffff, NULL, NUMPAD_000),
388
+ //DOM_CODE(0x0700b2, 0x0000, 0x0000, 0x0000, 0xffff, NULL, THOUSANDS_SEPARATOR),
389
+ //DOM_CODE(0x0700b3, 0x0000, 0x0000, 0x0000, 0xffff, NULL, DECIMAL_SEPARATOR),
390
+ //DOM_CODE(0x0700b4, 0x0000, 0x0000, 0x0000, 0xffff, NULL, CURRENCY_UNIT),
391
+ //DOM_CODE(0x0700b5, 0x0000, 0x0000, 0x0000, 0xffff, NULL, CURRENCY_SUBUNIT),
392
+ DOM_CODE(0x0700b6, 0x00b3, 0x00bb, 0x0000, 0xffff, "NumpadParenLeft",
393
+ NUMPAD_PAREN_LEFT), // Keypad_(
394
+ DOM_CODE(0x0700b7, 0x00b4, 0x00bc, 0x0000, 0xffff, "NumpadParenRight",
395
+ NUMPAD_PAREN_RIGHT), // Keypad_)
396
+
397
+ //DOM_CODE(0x0700b8, 0x0000, 0x0000, 0x0000, 0xffff, NULL, NUMPAD_BRACE_LEFT),
398
+ //DOM_CODE(0x0700b9, 0x0000, 0x0000, 0x0000, 0xffff, NULL, NUMPAD_BRACE_RIGHT),
399
+ //DOM_CODE(0x0700ba, 0x0000, 0x0000, 0x0000, 0xffff, NULL, NUMPAD_TAB),
400
+ DOM_CODE(0x0700bb, 0x0000, 0x0000, 0x0000, 0xffff, "NumpadBackspace",
401
+ NUMPAD_BACKSPACE), // Keypad_Backspace
402
+ //DOM_CODE(0x0700bc, 0x0000, 0x0000, 0x0000, 0xffff, NULL, NUMPAD_A),
403
+ //DOM_CODE(0x0700bd, 0x0000, 0x0000, 0x0000, 0xffff, NULL, NUMPAD_B),
404
+ //DOM_CODE(0x0700be, 0x0000, 0x0000, 0x0000, 0xffff, NULL, NUMPAD_C),
405
+ //DOM_CODE(0x0700bf, 0x0000, 0x0000, 0x0000, 0xffff, NULL, NUMPAD_D),
406
+
407
+ //DOM_CODE(0x0700c0, 0x0000, 0x0000, 0x0000, 0xffff, NULL, NUMPAD_E),
408
+ //DOM_CODE(0x0700c1, 0x0000, 0x0000, 0x0000, 0xffff, NULL, NUMPAD_F),
409
+ //DOM_CODE(0x0700c2, 0x0000, 0x0000, 0x0000, 0xffff, NULL, NUMPAD_XOR),
410
+ //DOM_CODE(0x0700c3, 0x0000, 0x0000, 0x0000, 0xffff, NULL, NUMPAD_CARAT),
411
+ //DOM_CODE(0x0700c4, 0x0000, 0x0000, 0x0000, 0xffff, NULL, NUMPAD_PERCENT),
412
+ //DOM_CODE(0x0700c5, 0x0000, 0x0000, 0x0000, 0xffff, NULL, NUMPAD_LESS_THAN),
413
+ //DOM_CODE(0x0700c6, 0x0000, 0x0000, 0x0000, 0xffff, NULL, NUMPAD_GREATER_THAN),
414
+ //DOM_CODE(0x0700c7, 0x0000, 0x0000, 0x0000, 0xffff, NULL, NUMPAD_AMERSAND),
415
+
416
+ //DOM_CODE(0x0700c8, 0x0000, 0x0000, 0x0000, 0xffff, NULL, NUMPAD_DOUBLE_AMPERSAND),
417
+ //DOM_CODE(0x0700c9, 0x0000, 0x0000, 0x0000, 0xffff, NULL, NUMPAD_VERTICAL_BAR),
418
+ //DOM_CODE(0x0700ca, 0x0000, 0x0000, 0x0000, 0xffff, NULL,
419
+ // NUMPAD_DOUBLE_VERTICAL_BAR), // Keypad_||
420
+ //DOM_CODE(0x0700cb, 0x0000, 0x0000, 0x0000, 0xffff, NULL, NUMPAD_COLON),
421
+ //DOM_CODE(0x0700cc, 0x0000, 0x0000, 0x0000, 0xffff, NULL, NUMPAD_NUMBER),
422
+ //DOM_CODE(0x0700cd, 0x0000, 0x0000, 0x0000, 0xffff, NULL, NUMPAD_SPACE),
423
+ //DOM_CODE(0x0700ce, 0x0000, 0x0000, 0x0000, 0xffff, NULL, NUMPAD_AT),
424
+ //DOM_CODE(0x0700cf, 0x0000, 0x0000, 0x0000, 0xffff, NULL, NUMPAD_EXCLAMATION),
425
+
426
+ DOM_CODE(0x0700d0, 0x0000, 0x0000, 0x0000, 0xffff, "NumpadMemoryStore",
427
+ NUMPAD_MEMORY_STORE), // Keypad_MemoryStore
428
+ DOM_CODE(0x0700d1, 0x0000, 0x0000, 0x0000, 0xffff, "NumpadMemoryRecall",
429
+ NUMPAD_MEMORY_RECALL), // Keypad_MemoryRecall
430
+ DOM_CODE(0x0700d2, 0x0000, 0x0000, 0x0000, 0xffff, "NumpadMemoryClear",
431
+ NUMPAD_MEMORY_CLEAR), // Keypad_MemoryClear
432
+ DOM_CODE(0x0700d3, 0x0000, 0x0000, 0x0000, 0xffff, "NumpadMemoryAdd",
433
+ NUMPAD_MEMORY_ADD), // Keypad_MemoryAdd
434
+ DOM_CODE(0x0700d4, 0x0000, 0x0000, 0x0000, 0xffff, "NumpadMemorySubtract",
435
+ NUMPAD_MEMORY_SUBTRACT), // Keypad_MemorySubtract
436
+ //DOM_CODE(0x0700d5, 0x0000, 0x0000, 0x0000, 0xffff, NULL, NUMPAD_MEMORY_MULTIPLE),
437
+ //DOM_CODE(0x0700d6, 0x0000, 0x0000, 0x0000, 0xffff, NULL, NUMPAD_MEMORY_DIVIDE),
438
+ DOM_CODE(0x0700d7, 0x0076, 0x007e, 0x0000, 0xffff, NULL, NUMPAD_SIGN_CHANGE), // +/-
439
+ // USB#0x0700d8 Keypad Clear -- see note L1 at top.
440
+ DOM_CODE(0x0700d8, 0x0000, 0x0000, 0x0000, 0xffff, "NumpadClear", NUMPAD_CLEAR),
441
+ DOM_CODE(0x0700d9, 0x0000, 0x0000, 0x0000, 0xffff, "NumpadClearEntry",
442
+ NUMPAD_CLEAR_ENTRY), // Keypad_ClearEntry
443
+ //DOM_CODE(0x0700da, 0x0000, 0x0000, 0x0000, 0xffff, NULL, NUMPAD_BINARY),
444
+ //DOM_CODE(0x0700db, 0x0000, 0x0000, 0x0000, 0xffff, NULL, NUMPAD_OCTAL),
445
+ //DOM_CODE(0x0700dc, 0x0000, 0x0000, 0x0000, 0xffff, NULL, NUMPAD_DECIMAL),
446
+ //DOM_CODE(0x0700dd, 0x0000, 0x0000, 0x0000, 0xffff, NULL, NUMPAD_HEXADECIMAL),
447
+
448
+ // USB#0700de - #0700df are reserved.
449
+ DOM_CODE(0x0700e0, 0x001d, 0x0025, 0x001d, 0x003b, "ControlLeft", CONTROL_LEFT),
450
+ DOM_CODE(0x0700e1, 0x002a, 0x0032, 0x002a, 0x0038, "ShiftLeft", SHIFT_LEFT),
451
+ // USB#0700e2: left Alt key (Mac left Option key).
452
+ DOM_CODE(0x0700e2, 0x0038, 0x0040, 0x0038, 0x003a, "AltLeft", ALT_LEFT),
453
+ // USB#0700e3: left GUI key, e.g. Windows, Mac Command, ChromeOS Search.
454
+ DOM_CODE(0x0700e3, 0x007d, 0x0085, 0xe05b, 0x0037, "MetaLeft", META_LEFT),
455
+ DOM_CODE(0x0700e4, 0x0061, 0x0069, 0xe01d, 0x003e, "ControlRight", CONTROL_RIGHT),
456
+ DOM_CODE(0x0700e5, 0x0036, 0x003e, 0x0036, 0x003c, "ShiftRight", SHIFT_RIGHT),
457
+ // USB#0700e6: right Alt key (Mac right Option key).
458
+ DOM_CODE(0x0700e6, 0x0064, 0x006c, 0xe038, 0x003d, "AltRight", ALT_RIGHT),
459
+ // USB#0700e7: right GUI key, e.g. Windows, Mac Command, ChromeOS Search.
460
+ DOM_CODE(0x0700e7, 0x007e, 0x0086, 0xe05c, 0x0036, "MetaRight", META_RIGHT),
461
+
462
+ // USB#0700e8 - #07ffff are reserved
463
+
464
+ // ==================================
465
+ // USB Usage Page 0x0c: Consumer Page
466
+ // ==================================
467
+ // AL = Application Launch
468
+ // AC = Application Control
469
+
470
+ // TODO(garykac): Many XF86 keys have multiple scancodes mapping to them.
471
+ // We need to map all of these into a canonical USB scancode without
472
+ // confusing the reverse-lookup - most likely by simply returning the first
473
+ // found match.
474
+
475
+ // TODO(garykac): Find appropriate mappings for:
476
+ // Win#e03c Music - USB#0c0193 is AL_AVCapturePlayback
477
+ // Win#e064 Pictures
478
+ // XKB#0080 XF86LaunchA
479
+ // XKB#0099 XF86Send
480
+ // XKB#009b XF86Xfer
481
+ // XKB#009c XF86Launch1
482
+ // XKB#009d XF86Launch2
483
+ // XKB... remaining XF86 keys
484
+
485
+ // KEY_BRIGHTNESS* added in Linux 3.16
486
+ // http://www.usb.org/developers/hidpage/HUTRR41.pdf
487
+ //
488
+ // Keyboard backlight/illumination spec update.
489
+ // https://www.usb.org/sites/default/files/hutrr73_-_fn_key_and_keyboard_backlight_brightness_0.pdf
490
+ // USB evdev XKB Win Mac Code
491
+ DOM_CODE(0x0c0060, 0x0166, 0x016e, 0x0000, 0xffff, NULL, INFO),
492
+ DOM_CODE(0x0c0061, 0x0172, 0x017a, 0x0000, 0xffff, NULL, CLOSED_CAPTION_TOGGLE),
493
+ DOM_CODE(0x0c006f, 0x00e1, 0x00e9, 0x0000, 0xffff, "BrightnessUp", BRIGHTNESS_UP),
494
+ DOM_CODE(0x0c0070, 0x00e0, 0x00e8, 0x0000, 0xffff, "BrightnessDown",
495
+ BRIGHTNESS_DOWN), // Display Brightness Decrement
496
+ DOM_CODE(0x0c0072, 0x01af, 0x01b7, 0x0000, 0xffff, NULL, BRIGHTNESS_TOGGLE),
497
+ DOM_CODE(0x0c0073, 0x0250, 0x0258, 0x0000, 0xffff, NULL, BRIGHTNESS_MINIMIUM),
498
+ DOM_CODE(0x0c0074, 0x0251, 0x0259, 0x0000, 0xffff, NULL, BRIGHTNESS_MAXIMUM),
499
+ DOM_CODE(0x0c0075, 0x00f4, 0x00fc, 0x0000, 0xffff, NULL, BRIGHTNESS_AUTO),
500
+ DOM_CODE(0x0c0079, 0x00e6, 0x00ee, 0x0000, 0xffff, NULL, KBD_ILLUM_UP),
501
+ DOM_CODE(0x0c007a, 0x00e5, 0x00ed, 0x0000, 0xffff, NULL, KBD_ILLUM_DOWN),
502
+ DOM_CODE(0x0c0083, 0x0195, 0x019d, 0x0000, 0xffff, NULL, MEDIA_LAST),
503
+ DOM_CODE(0x0c008c, 0x00a9, 0x00b1, 0x0000, 0xffff, NULL, LAUNCH_PHONE),
504
+ DOM_CODE(0x0c008d, 0x016a, 0x0172, 0x0000, 0xffff, NULL, PROGRAM_GUIDE),
505
+ DOM_CODE(0x0c0094, 0x00ae, 0x00b6, 0x0000, 0xffff, NULL, EXIT),
506
+ DOM_CODE(0x0c009c, 0x019a, 0x01a2, 0x0000, 0xffff, NULL, CHANNEL_UP),
507
+ DOM_CODE(0x0c009d, 0x019b, 0x01a3, 0x0000, 0xffff, NULL, CHANNEL_DOWN),
508
+
509
+ // USB evdev XKB Win Mac
510
+ DOM_CODE(0x0c00b0, 0x00cf, 0x00d7, 0x0000, 0xffff, "MediaPlay", MEDIA_PLAY),
511
+ DOM_CODE(0x0c00b1, 0x00c9, 0x00d1, 0x0000, 0xffff, "MediaPause", MEDIA_PAUSE),
512
+ DOM_CODE(0x0c00b2, 0x00a7, 0x00af, 0x0000, 0xffff, "MediaRecord", MEDIA_RECORD),
513
+ DOM_CODE(0x0c00b3, 0x00d0, 0x00d8, 0x0000, 0xffff, "MediaFastForward", MEDIA_FAST_FORWARD),
514
+ DOM_CODE(0x0c00b4, 0x00a8, 0x00b0, 0x0000, 0xffff, "MediaRewind", MEDIA_REWIND),
515
+ DOM_CODE(0x0c00b5, 0x00a3, 0x00ab, 0xe019, 0xffff, "MediaTrackNext",
516
+ MEDIA_TRACK_NEXT),
517
+ DOM_CODE(0x0c00b6, 0x00a5, 0x00ad, 0xe010, 0xffff, "MediaTrackPrevious",
518
+ MEDIA_TRACK_PREVIOUS),
519
+ DOM_CODE(0x0c00b7, 0x00a6, 0x00ae, 0xe024, 0xffff, "MediaStop", MEDIA_STOP),
520
+ DOM_CODE(0x0c00b8, 0x00a1, 0x00a9, 0xe02c, 0xffff, "Eject", EJECT),
521
+ DOM_CODE(0x0c00cd, 0x00a4, 0x00ac, 0xe022, 0xffff, "MediaPlayPause",
522
+ MEDIA_PLAY_PAUSE),
523
+ DOM_CODE(0x0c00cf, 0x0246, 0x024e, 0x0000, 0xffff, NULL, SPEECH_INPUT_TOGGLE),
524
+ DOM_CODE(0x0c00e5, 0x00d1, 0x00d9, 0x0000, 0xffff, NULL, BASS_BOOST),
525
+ //DOM_CODE(0x0c00e6, 0x0000, 0x0000, 0x0000, 0xffff, NULL, SURROUND_MODE),
526
+ //DOM_CODE(0x0c0150, 0x0000, 0x0000, 0x0000, 0xffff, NULL, AUDIO_BALANCE_RIGHT),
527
+ //DOM_CODE(0x0c0151, 0x0000, 0x0000, 0x0000, 0xffff, NULL, AUDIO_BALANCE_LEFT ),
528
+ //DOM_CODE(0x0c0152, 0x0000, 0x0000, 0x0000, 0xffff, NULL, AUDIO_BASS_INCREMENT),
529
+ //DOM_CODE(0x0c0153, 0x0000, 0x0000, 0x0000, 0xffff, NULL, AUDIO_BASS_DECREMENT),
530
+ //DOM_CODE(0x0c0154, 0x0000, 0x0000, 0x0000, 0xffff, NULL, AUDIO_TREBLE_INCREMENT),
531
+ //DOM_CODE(0x0c0155, 0x0000, 0x0000, 0x0000, 0xffff, NULL, AUDIO_TREBLE_DECREMENT),
532
+ // USB#0c0183: AL Consumer Control Configuration
533
+ DOM_CODE(0x0c0183, 0x00ab, 0x00b3, 0xe06d, 0xffff, "MediaSelect", MEDIA_SELECT),
534
+ DOM_CODE(0x0c0184, 0x01a5, 0x01ad, 0x0000, 0xffff, NULL, LAUNCH_WORD_PROCESSOR),
535
+ DOM_CODE(0x0c0186, 0x01a7, 0x01af, 0x0000, 0xffff, NULL, LAUNCH_SPREADSHEET),
536
+ // USB#0x0c018a AL_EmailReader
537
+ DOM_CODE(0x0c018a, 0x009b, 0x00a3, 0xe06c, 0xffff, "LaunchMail", LAUNCH_MAIL),
538
+ // USB#0x0c018d: AL Contacts/Address Book
539
+ DOM_CODE(0x0c018d, 0x01ad, 0x01b5, 0x0000, 0xffff, NULL, LAUNCH_CONTACTS),
540
+ // USB#0x0c018e: AL Calendar/Schedule
541
+ DOM_CODE(0x0c018e, 0x018d, 0x0195, 0x0000, 0xffff, NULL, LAUNCH_CALENDAR),
542
+ // USB#0x0c018f AL Task/Project Manager
543
+ //DOM_CODE(0x0c018f, 0x0241, 0x0249, 0x0000, 0xffff, NULL, LAUNCH_TASK_MANAGER),
544
+ // USB#0x0c0190: AL Log/Journal/Timecard
545
+ //DOM_CODE(0x0c0190, 0x0242, 0x024a, 0x0000, 0xffff, NULL, LAUNCH_LOG),
546
+ // USB#0x0c0192: AL_Calculator
547
+ DOM_CODE(0x0c0192, 0x008c, 0x0094, 0xe021, 0xffff, "LaunchApp2", LAUNCH_APP2),
548
+ // USB#0c0194: My Computer (AL_LocalMachineBrowser)
549
+ DOM_CODE(0x0c0194, 0x0090, 0x0098, 0xe06b, 0xffff, "LaunchApp1", LAUNCH_APP1),
550
+ DOM_CODE(0x0c0196, 0x0096, 0x009e, 0x0000, 0xffff, NULL, LAUNCH_INTERNET_BROWSER),
551
+ DOM_CODE(0x0c019C, 0x01b1, 0x01b9, 0x0000, 0xffff, NULL, LOG_OFF),
552
+ // USB#0x0c019e: AL Terminal Lock/Screensaver
553
+ DOM_CODE(0x0c019e, 0x0098, 0x00a0, 0x0000, 0xffff, NULL, LOCK_SCREEN),
554
+ // USB#0x0c019f AL Control Panel
555
+ DOM_CODE(0x0c019f, 0x0243, 0x024b, 0x0000, 0xffff, "LaunchControlPanel",
556
+ LAUNCH_CONTROL_PANEL),
557
+ // USB#0x0c01a2: AL Select Task/Application
558
+ DOM_CODE(0x0c01a2, 0x0244, 0x024c, 0x0000, 0xffff, "SelectTask", SELECT_TASK),
559
+ // USB#0x0c01a7: AL_Documents
560
+ DOM_CODE(0x0c01a7, 0x00eb, 0x00f3, 0x0000, 0xffff, NULL, LAUNCH_DOCUMENTS),
561
+ DOM_CODE(0x0c01ab, 0x01b0, 0x01b8, 0x0000, 0xffff, NULL, SPELL_CHECK),
562
+ // USB#0x0c01ae: AL Keyboard Layout
563
+ DOM_CODE(0x0c01ae, 0x0176, 0x017e, 0x0000, 0xffff, NULL, LAUNCH_KEYBOARD_LAYOUT),
564
+ DOM_CODE(0x0c01b1, 0x0245, 0x024d, 0x0000, 0xffff, "LaunchScreenSaver",
565
+ LAUNCH_SCREEN_SAVER), // AL Screen Saver
566
+ DOM_CODE(0x0c01cb, 0x0247, 0x024f, 0x0000, 0xffff, "LaunchAssistant",
567
+ LAUNCH_ASSISTANT), // AL Context-aware desktop assistant
568
+ // USB#0c01b4: Home Directory (AL_FileBrowser) (Explorer)
569
+ //DOM_CODE(0x0c01b4, 0x0000, 0x0000, 0x0000, 0xffff, NULL, LAUNCH_FILE_BROWSER),
570
+ // USB#0x0c01b7: AL Audio Browser
571
+ DOM_CODE(0x0c01b7, 0x0188, 0x0190, 0x0000, 0xffff, NULL, LAUNCH_AUDIO_BROWSER),
572
+ // USB#0x0c0201: AC New
573
+ DOM_CODE(0x0c0201, 0x00b5, 0x00bd, 0x0000, 0xffff, NULL, NEW),
574
+ // USB#0x0c0203: AC Close
575
+ DOM_CODE(0x0c0203, 0x00ce, 0x00d6, 0x0000, 0xffff, NULL, CLOSE),
576
+ // USB#0x0c0207: AC Close
577
+ DOM_CODE(0x0c0207, 0x00ea, 0x00f2, 0x0000, 0xffff, NULL, SAVE),
578
+ // USB#0x0c0208: AC Print
579
+ DOM_CODE(0x0c0208, 0x00d2, 0x00da, 0x0000, 0xffff, NULL, PRINT),
580
+ // USB#0x0c0221: AC_Search
581
+ DOM_CODE(0x0c0221, 0x00d9, 0x00e1, 0xe065, 0xffff, "BrowserSearch", BROWSER_SEARCH),
582
+ // USB#0x0c0223: AC_Home
583
+ DOM_CODE(0x0c0223, 0x00ac, 0x00b4, 0xe032, 0xffff, "BrowserHome", BROWSER_HOME),
584
+ // USB#0x0c0224: AC_Back
585
+ DOM_CODE(0x0c0224, 0x009e, 0x00a6, 0xe06a, 0xffff, "BrowserBack", BROWSER_BACK),
586
+ // USB#0x0c0225: AC_Forward
587
+ DOM_CODE(0x0c0225, 0x009f, 0x00a7, 0xe069, 0xffff, "BrowserForward",
588
+ BROWSER_FORWARD),
589
+ // USB#0x0c0226: AC_Stop
590
+ DOM_CODE(0x0c0226, 0x0080, 0x0088, 0xe068, 0xffff, "BrowserStop", BROWSER_STOP),
591
+ // USB#0x0c0227: AC_Refresh (Reload)
592
+ DOM_CODE(0x0c0227, 0x00ad, 0x00b5, 0xe067, 0xffff, "BrowserRefresh",
593
+ BROWSER_REFRESH),
594
+ // USB#0x0c022a: AC_Bookmarks (Favorites)
595
+ DOM_CODE(0x0c022a, 0x009c, 0x00a4, 0xe066, 0xffff, "BrowserFavorites",
596
+ BROWSER_FAVORITES),
597
+ DOM_CODE(0x0c022d, 0x01a2, 0x01aa, 0x0000, 0xffff, NULL, ZOOM_IN),
598
+ DOM_CODE(0x0c022e, 0x01a3, 0x01ab, 0x0000, 0xffff, NULL, ZOOM_OUT),
599
+ // USB#0x0c0230: AC Full Screen View
600
+ //DOM_CODE(0x0c0230, 0x0000, 0x0000, 0x0000, 0xffff, NULL, ZOOM_FULL),
601
+ // USB#0x0c0231: AC Normal View
602
+ //DOM_CODE(0x0c0231, 0x0000, 0x0000, 0x0000, 0xffff, NULL, ZOOM_NORMAL),
603
+ DOM_CODE(0x0c0232, 0x0174, 0x017c, 0x0000, 0xffff, "ZoomToggle",
604
+ ZOOM_TOGGLE), // AC View Toggle
605
+ // USB#0x0c0279: AC Redo/Repeat
606
+ DOM_CODE(0x0c0279, 0x00b6, 0x00be, 0x0000, 0xffff, NULL, REDO),
607
+ // USB#0x0c0289: AC_Reply
608
+ DOM_CODE(0x0c0289, 0x00e8, 0x00f0, 0x0000, 0xffff, "MailReply", MAIL_REPLY),
609
+ // USB#0x0c028b: AC_ForwardMsg (MailForward)
610
+ DOM_CODE(0x0c028b, 0x00e9, 0x00f1, 0x0000, 0xffff, "MailForward", MAIL_FORWARD),
611
+ // USB#0x0c028c: AC_Send
612
+ DOM_CODE(0x0c028c, 0x00e7, 0x00ef, 0x0000, 0xffff, "MailSend", MAIL_SEND),
613
+ // USB#0x0c029d: AC Next Keyboard Layout Select
614
+ DOM_CODE(0x0c029d, 0x0248, 0x0250, 0x0000, 0xffff, "KeyboardLayoutSelect",
615
+ KEYBOARD_LAYOUT_SELECT),
616
+ DOM_CODE(0x0c029f, 0x0078, 0x0080, 0x0000, 0xffff, "ShowAllWindows",
617
+ SHOW_ALL_WINDOWS), // AC Desktop Show All Windows
618
+ };
@@ -0,0 +1,23 @@
1
+ // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2
+ // Use of this source code is governed by a BSD-style license that can be
3
+ // found in the LICENSE file.
4
+
5
+ #ifndef UI_EVENTS_KEYCODES_KEYBOARD_CODES_H_
6
+ #define UI_EVENTS_KEYCODES_KEYBOARD_CODES_H_
7
+
8
+ // Specifies modifier keys as stated in
9
+ // third_party/WebKit/Source/WebCore/inspector/Inspector.json.
10
+ // Notice: |kNumLockKeyModifierMask| is for usage in the key_converter.cc
11
+ // and keycode_text_conversion_x.cc only, not for inspector.
12
+ enum KeyModifierMask {
13
+ kAltKeyModifierMask = 1 << 0,
14
+ kControlKeyModifierMask = 1 << 1,
15
+ kMetaKeyModifierMask = 1 << 2,
16
+ kShiftKeyModifierMask = 1 << 3,
17
+ kNumLockKeyModifierMask = 1 << 4,
18
+ kLevel3KeyModifierMask = 1 << 5,
19
+ kLevel5KeyModifierMask = 1 << 6
20
+ };
21
+
22
+ #endif // UI_EVENTS_KEYCODES_KEYBOARD_CODES_H_
23
+