OLD | NEW |
(Empty) | |
| 1 Copyright 2013 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 Data in this file was created by referencing: |
| 6 USB HID Usage Tables (v1.11) 27 June 2001 |
| 7 HIToolbox/Events.h (Mac) |
| 8 |
| 9 The first entry must provide the invalid code for each platform. |
| 10 |
| 11 USB XKB Win Mac Code USB Name |
| 12 0x000000 0x0000 0x0000 0xffff - "Invalid" |
| 13 |
| 14 ========================================= |
| 15 USB Usage Page 0x01: Generic Desktop Page |
| 16 ========================================= |
| 17 |
| 18 Sleep could be encoded as USB#0c0032, but there's no corresponding WakeUp |
| 19 in the 0x0c USB page. |
| 20 |
| 21 USB XKB Win Mac Code USB Name |
| 22 0x010082 0x0096 - - - "SystemSleep" |
| 23 0x010083 0x0097 - - - "SystemWakeUp" |
| 24 |
| 25 ========================================= |
| 26 USB Usage Page 0x07: Keyboard/Keypad Page |
| 27 ========================================= |
| 28 |
| 29 TODO(garykac): |
| 30 XKB#005c ISO Level3 Shift (AltGr) |
| 31 XKB#005e <>|| |
| 32 XKB#006d Linefeed |
| 33 XKB#008a SunProps cf. USB#0700a3 CrSel/Props |
| 34 XKB#008e SunOpen |
| 35 Mac#003f kVK_Function |
| 36 Mac#000a kVK_ISO_Section (ISO keyboards only) |
| 37 Mac#0066 kVK_JIS_Eisu (USB#07008a Henkan?) |
| 38 |
| 39 USB XKB Win Mac Code USB Name |
| 40 0x070000 - - - - "Reserved" |
| 41 0x070001 - - - - "ErrorRollOver" |
| 42 0x070002 - - - - "POSTFail" |
| 43 0x070003 - - - - "ErrorUndefined" |
| 44 0x070004 0x0026 0x001e 0x0000 KeyA "aA" |
| 45 0x070005 0x0038 0x0030 0x000b KeyB "bB" |
| 46 0x070006 0x0036 0x002e 0x0008 KeyC "cC" |
| 47 0x070007 0x0028 0x0020 0x0002 KeyD "dD" |
| 48 |
| 49 USB XKB Win Mac Code USB Name |
| 50 0x070008 0x001a 0x0012 0x000e KeyE "eE" |
| 51 0x070009 0x0029 0x0021 0x0003 KeyF "fF" |
| 52 0x07000a 0x002a 0x0022 0x0005 KeyG "gG" |
| 53 0x07000b 0x002b 0x0023 0x0004 KeyH "hH" |
| 54 0x07000c 0x001f 0x0017 0x0022 KeyI "iI" |
| 55 0x07000d 0x002c 0x0024 0x0026 KeyJ "jJ" |
| 56 0x07000e 0x002d 0x0025 0x0028 KeyK "kK" |
| 57 0x07000f 0x002e 0x0026 0x0025 KeyL "lL" |
| 58 |
| 59 USB XKB Win Mac Code USB Name |
| 60 0x070010 0x003a 0x0032 0x002e KeyM "mM" |
| 61 0x070011 0x0039 0x0031 0x002d KeyN "nN" |
| 62 0x070012 0x0020 0x0018 0x001f KeyO "oO" |
| 63 0x070013 0x0021 0x0019 0x0023 KeyP "pP" |
| 64 0x070014 0x0018 0x0010 0x000c KeyQ "qQ" |
| 65 0x070015 0x001b 0x0013 0x000f KeyR "rR" |
| 66 0x070016 0x0027 0x001f 0x0001 KeyS "sS" |
| 67 0x070017 0x001c 0x0014 0x0011 KeyT "tT" |
| 68 |
| 69 USB XKB Win Mac Code USB Name |
| 70 0x070018 0x001e 0x0016 0x0020 KeyU "uU" |
| 71 0x070019 0x0037 0x002f 0x0009 KeyV "vV" |
| 72 0x07001a 0x0019 0x0011 0x000d KeyW "wW" |
| 73 0x07001b 0x0035 0x002d 0x0007 KeyX "xX" |
| 74 0x07001c 0x001d 0x0015 0x0010 KeyY "yY" |
| 75 0x07001d 0x0034 0x002c 0x0006 KeyZ "zZ" |
| 76 0x07001e 0x000a 0x0002 0x0012 Digit1 "1!" |
| 77 0x07001f 0x000b 0x0003 0x0013 Digit2 "2@" |
| 78 |
| 79 USB XKB Win Mac Code USB Name |
| 80 0x070020 0x000c 0x0004 0x0014 Digit3 "3#" |
| 81 0x070021 0x000d 0x0005 0x0015 Digit4 "4$" |
| 82 0x070022 0x000e 0x0006 0x0017 Digit5 "5%" |
| 83 0x070023 0x000f 0x0007 0x0016 Digit6 "6^" |
| 84 0x070024 0x0010 0x0008 0x001a Digit7 "7&" |
| 85 0x070025 0x0011 0x0009 0x001c Digit8 "8*" |
| 86 0x070026 0x0012 0x000a 0x0019 Digit9 "9(" |
| 87 0x070027 0x0013 0x000b 0x001d Digit0 "0)" |
| 88 |
| 89 USB XKB Win Mac Code USB Name |
| 90 0x070028 0x0024 0x001c 0x0024 Enter |
| 91 0x070029 0x0009 0x0001 0x0035 Escape |
| 92 0x07002a 0x0016 0x000e 0x0033 Backspace |
| 93 0x07002b 0x0017 0x000f 0x0030 Tab |
| 94 0x07002c 0x0041 0x0039 0x0031 Space "Spacebar" |
| 95 0x07002d 0x0014 0x000c 0x001b Minus "-_" |
| 96 0x07002e 0x0015 0x000d 0x0018 Equal "=+" |
| 97 0x07002f 0x0022 0x001a 0x0021 BracketLeft "[{" |
| 98 |
| 99 USB XKB Win Mac Code USB Name |
| 100 0x070030 0x0023 0x001b 0x001e BracketRight "]}" |
| 101 0x070031 0x0033 0x002b 0x002a Backslash "\\| (US keyboard only)" |
| 102 |
| 103 USB#070032 never appears on keyboards that have USB#070031. |
| 104 Platforms use the same scancode as for the two keys. |
| 105 The keycap varies on international keyboards: |
| 106 Dan: '* Dutch: <> Ger: #' UK: #~ |
| 107 TODO(garykac): Verify Mac intl keyboard. |
| 108 |
| 109 USB XKB Win Mac Code USB Name |
| 110 070032 0x0033 0x002b 0x002a IntlHash "#~ (Non-US)" |
| 111 0x070033 0x002f 0x0027 0x0029 Semicolon ";:" |
| 112 0x070034 0x0030 0x0028 0x0027 Quote '\'"' |
| 113 0x070035 0x0031 0x0029 0x0032 Backquote "`~" |
| 114 0x070036 0x003b 0x0033 0x002b Comma ",<" |
| 115 0x070037 0x003c 0x0034 0x002f Period ".>" |
| 116 |
| 117 USB XKB Win Mac Code USB Name |
| 118 0x070038 0x003d 0x0035 0x002c Slash "/?" |
| 119 0x070039 0x0042 0x003a 0x0039 CapsLock |
| 120 0x07003a 0x0043 0x003b 0x007a F1 |
| 121 0x07003b 0x0044 0x003c 0x0078 F2 |
| 122 0x07003c 0x0045 0x003d 0x0063 F3 |
| 123 0x07003d 0x0046 0x003e 0x0076 F4 |
| 124 0x07003e 0x0047 0x003f 0x0060 F5 |
| 125 0x07003f 0x0048 0x0040 0x0061 F6 |
| 126 |
| 127 USB XKB Win Mac Code USB Name |
| 128 0x070040 0x0049 0x0041 0x0062 F7 |
| 129 0x070041 0x004a 0x0042 0x0064 F8 |
| 130 0x070042 0x004b 0x0043 0x0065 F9 |
| 131 0x070043 0x004c 0x0044 0x006d F10 |
| 132 0x070044 0x005f 0x0057 0x0067 F11 |
| 133 0x070045 0x0060 0x0058 0x006f F12 |
| 134 PrintScreen is effectively F13 on Mac OS X. |
| 135 0x070046 0x006b 0xe037 - PrintScreen |
| 136 0x070047 0x004e 0x0046 - ScrollLock |
| 137 |
| 138 USB XKB Win Mac Code USB Name |
| 139 0x070048 0x007f - - Pause |
| 140 Labeled "Help/Insert" on Mac. |
| 141 0x070049 0x0076 0xe052 0x0072 Insert |
| 142 0x07004a 0x006e 0xe047 0x0073 Home |
| 143 0x07004b 0x0070 0xe049 0x0074 PageUp |
| 144 Delete (Forward Delete) |
| 145 0x07004c 0x0077 0xe053 0x0075 Delete |
| 146 0x07004d 0x0073 0xe04f 0x0077 End |
| 147 0x07004e 0x0075 0xe051 0x0079 PageDown |
| 148 0x07004f 0x0072 0xe04d 0x007c ArrowRight |
| 149 |
| 150 USB XKB Win Mac Code USB Name |
| 151 0x070050 0x0071 0xe04b 0x007b ArrowLeft |
| 152 0x070051 0x0074 0xe050 0x007d ArrowDown |
| 153 0x070052 0x006f 0xe048 0x007e ArrowUp |
| 154 0x070053 0x004d 0x0045 0x0047 NumLock "Keypad_NumLock Clear" |
| 155 0x070054 0x006a 0xe035 0x004b NumpadDivide "Keypad_/" |
| 156 0x070055 0x003f 0x0037 0x0043 NumpadMultiply "Keypad_*" |
| 157 0x070056 0x0052 0x004a 0x004e NumpadSubtract "Keypad_-" |
| 158 0x070057 0x0056 0x004e 0x0045 NumpadAdd "Keypad_+" |
| 159 |
| 160 USB XKB Win Mac Code USB Name |
| 161 0x070058 0x0068 0xe01c 0x004c NumpadEnter "Keypad_Enter" |
| 162 0x070059 0x0057 0x004f 0x0053 Numpad1 "Keypad_1 End" |
| 163 0x07005a 0x0058 0x0050 0x0054 Numpad2 "Keypad_2 DownArrow" |
| 164 0x07005b 0x0059 0x0051 0x0055 Numpad3 "Keypad_3 PageDown" |
| 165 0x07005c 0x0053 0x004b 0x0056 Numpad4 "Keypad_4 LeftArrow" |
| 166 0x07005d 0x0054 0x004c 0x0057 Numpad5 "Keypad_5" |
| 167 0x07005e 0x0055 0x004d 0x0058 Numpad6 "Keypad_6 RightArrow" |
| 168 0x07005f 0x004f 0x0047 0x0059 Numpad7 "Keypad_7 Home" |
| 169 |
| 170 USB XKB Win Mac Code USB Name |
| 171 0x070060 0x0050 0x0048 0x005b Numpad8 "Keypad_8 UpArrow" |
| 172 0x070061 0x0051 0x0049 0x005c Numpad9 "Keypad_9 PageUp" |
| 173 0x070062 0x005a 0x0052 0x0052 Numpad0 "Keypad_0 Insert" |
| 174 0x070063 0x005b 0x0053 0x0041 NumpadDecimal "Keypad_. Delete" |
| 175 USB#070064 is not present on US keyboard. |
| 176 This key is typically located near LeftShift key. |
| 177 The keycap varies on international keyboards: |
| 178 Dan: <> Dutch: ][ Ger: <> UK: \| |
| 179 0x070064 0x005e 0x0056 0x000a IntlBackslash "Non-US \|" |
| 180 AppMenu (next to RWin key) |
| 181 0x070065 0x0087 0xe05d 0x006e ContextMenu |
| 182 0x070066 0x007c - - Power |
| 183 0x070067 0x007d - 0x0051 NumpadEqual "Keypad_=" |
| 184 |
| 185 USB XKB Win Mac Code USB Name |
| 186 0x070068 - 0x005b 0x0069 F13 |
| 187 0x070069 - 0x005c 0x006b F14 |
| 188 0x07006a - 0x005d 0x0071 F15 |
| 189 0x07006b - 0x0063 0x006a F16 |
| 190 0x07006c - 0x0064 0x0040 F17 |
| 191 0x07006d - 0x0065 0x004f F18 |
| 192 0x07006e - 0x0066 0x0050 F19 |
| 193 0x07006f - 0x0067 0x005a F20 |
| 194 |
| 195 USB XKB Win Mac Code USB Name |
| 196 0x070070 - 0x0068 - F21 |
| 197 0x070071 - 0x0069 - F22 |
| 198 0x070072 - 0x006a - F23 |
| 199 0x070073 - 0x006b - F24 |
| 200 0x070074 - - - - "Execute" |
| 201 0x070075 0x0092 0xe03b - Help |
| 202 0x070076 0x0093 - - - "Menu" |
| 203 070077 - - - - "Select" |
| 204 |
| 205 USB XKB Win Mac Code USB Name |
| 206 070078 - - - - "Stop" |
| 207 0x070079 0x0089 - - - "Again (Redo)" |
| 208 0x07007a 0x008b 0xe008 - Undo |
| 209 0x07007b 0x0091 0xe017 - Cut |
| 210 0x07007c 0x008d 0xe018 - Copy |
| 211 0x07007d 0x008f 0xe00a - Paste |
| 212 0x07007e 0x0090 - - - "Find" |
| 213 0x07007f 0x0079 0xe020 0x004a VolumeMute |
| 214 |
| 215 USB XKB Win Mac Code USB Name |
| 216 0x070080 0x007b 0xe030 0x0048 VolumeUp |
| 217 0x070081 0x007a 0xe02e 0x0049 VolumeDown |
| 218 070082 - - - - "LockingCapsLock" |
| 219 070083 - - - - "LockingNumLock" |
| 220 070084 - - - - "LockingScrollLock" |
| 221 USB#070085 is used as Brazilian Keypad_. |
| 222 0x070085 - - 0x005f NumpadComma "Keypad_Comma" |
| 223 |
| 224 USB#070086 is used on AS/400 keyboards. Standard Keypad_= is USB#070067. |
| 225 070086 - - - - "Keypad_=" |
| 226 |
| 227 USB#070087 International1 is used for Brazilian /? and Japanese _ 'ro'. |
| 228 0x070087 0x0061 - 0x005e IntlRo "International1" |
| 229 USB#070088 is used as Japanese Hiragana/Katakana key. |
| 230 0x070088 0x0065 - 0x0068 KanaMode "International2" |
| 231 USB#070089 is used as Japanese Yen key. |
| 232 0x070089 0x0084 0x007d 0x005d IntlYen "International3" |
| 233 USB#07008a is used as Japanese Henkan (Convert) key. |
| 234 0x07008a 0x0064 - - Convert "International4" |
| 235 USB#07008b is used as Japanese Muhenkan (No-convert) key. |
| 236 0x07008b 0x0066 - - NonConvert "International5" |
| 237 07008c - - - - "International6" |
| 238 07008d - - - - "International7" |
| 239 07008e - - - - "International8" |
| 240 07008f - - - - "International9" |
| 241 |
| 242 0x070090 0x0082 - - Lang1 "Hangul" |
| 243 0x070091 0x0083 - - Lang2 "Hanja" |
| 244 0x070092 0x0062 - - Lang3 "Katakana" |
| 245 0x070093 0x0063 - - Lang4 "Hiragana" |
| 246 0x070094 - - - Lang5 "Zenkaku/Hankaku" |
| 247 070095 - - - - "LANG6" |
| 248 070096 - - - - "LANG7" |
| 249 070097 - - - - "LANG8" |
| 250 070098 - - - - "LANG9" |
| 251 |
| 252 USB XKB Win Mac Code USB Name |
| 253 070099 - - - - "AlternateErase" |
| 254 07009a - - - - "SysReq/Attention" |
| 255 0x07009b 0x0088 - - Abort |
| 256 07009c - - - - "Clear" |
| 257 07009d - - - - "Prior" |
| 258 07009e - - - - "Return" |
| 259 07009f - - - - "Separator" |
| 260 |
| 261 USB XKB Win Mac Code USB Name |
| 262 0700a0 - - - - "Out" |
| 263 0700a1 - - - - "Oper" |
| 264 0700a2 - - - - "Clear/Again" |
| 265 0700a3 - - - - "CrSel/Props" |
| 266 0700a4 - - - - "ExSel" |
| 267 |
| 268 USB XKB Win Mac Code USB Name |
| 269 0700b0 - - - - "Keypad_00" |
| 270 0700b1 - - - - "Keypad_000" |
| 271 0700b2 - - - - "ThousandsSeparator" |
| 272 0700b3 - - - - "DecimalSeparator" |
| 273 0700b4 - - - - "CurrencyUnit" |
| 274 0700b5 - - - - "CurrencySubunit" |
| 275 0x0700b6 0x00bb - - NumpadParenLeft "Keypad_(" |
| 276 0x0700b7 0x00bc - - NumpadParenRight "Keypad_)" |
| 277 |
| 278 USB XKB Win Mac Code USB Name |
| 279 0700b8 - - - - "Keypad_{" |
| 280 0700b9 - - - - "Keypad_}" |
| 281 0700ba - - - - "Keypad_Tab" |
| 282 0700bb - - - - "Keypad_Backspace" |
| 283 0700bc - - - - "Keypad_A" |
| 284 0700bd - - - - "Keypad_B" |
| 285 0700be - - - - "Keypad_C" |
| 286 0700bf - - - - "Keypad_D" |
| 287 |
| 288 USB XKB Win Mac Code USB Name |
| 289 0700c0 - - - - "Keypad_E" |
| 290 0700c1 - - - - "Keypad_F" |
| 291 0700c2 - - - - "Keypad_Xor" |
| 292 0700c3 - - - - "Keypad_^" |
| 293 0700c4 - - - - "Keypad_%" |
| 294 0700c5 - - - - "Keypad_<" |
| 295 0700c6 - - - - "Keypad_>" |
| 296 0700c7 - - - - "Keypad_&" |
| 297 |
| 298 USB XKB Win Mac Code USB Name |
| 299 0700c8 - - - - "Keypad_&&" |
| 300 0700c9 - - - - "Keypad_|" |
| 301 0700ca - - - - "Keypad_||" |
| 302 0700cb - - - - "Keypad_:" |
| 303 0700cc - - - - "Keypad_#" |
| 304 0700cd - - - - "Keypad_Space" |
| 305 0700ce - - - - "Keypad_@" |
| 306 0700cf - - - - "Keypad_!" |
| 307 |
| 308 USB XKB Win Mac Code USB Name |
| 309 0700d0 - - - - "Keypad_MemoryStore" |
| 310 0700d1 - - - - "Keypad_MemoryRecall" |
| 311 0700d2 - - - - "Keypad_MemoryClear" |
| 312 0700d3 - - - - "Keypad_MemoryAdd" |
| 313 0700d4 - - - - "Keypad_MemorySubtract" |
| 314 0700d5 - - - - "Keypad_MemoryMultiply" |
| 315 0700d6 - - - - "Keypad_MemoryDivide" |
| 316 0x0700d7 0x007e - - --NumpadChangeSign "Keypad_+/-" |
| 317 |
| 318 USB XKB Win Mac Code USB Name |
| 319 0700d8 - - - - "Keypad_Clear" |
| 320 0700d9 - - - - "Keypad_ClearEntry" |
| 321 0700da - - - - "Keypad_Binary" |
| 322 0700db - - - - "Keypad_Octal" |
| 323 0x0700dc 0x0081 - - - "Keypad_Decimal" |
| 324 0700dd - - - - "Keypad_Hexadecimal" |
| 325 USB#0700de - #0700df are reserved. |
| 326 |
| 327 USB XKB Win Mac Code USB Name |
| 328 0x0700e0 0x0025 0x001d 0x003b ControlLeft |
| 329 0x0700e1 0x0032 0x002a 0x0038 ShiftLeft |
| 330 0x0700e2 0x0040 0x0038 0x003a AltLeft "LeftAlt/Option" |
| 331 0x0700e3 0x0085 0xe05b 0x0037 OSLeft "LeftGUI/Super/Win/Cmd" |
| 332 0x0700e4 0x0069 0xe01d 0x003e ControlRight |
| 333 0x0700e5 0x003e 0x0036 0x003c ShiftRight |
| 334 0x0700e6 0x006c 0xe038 0x003d AltRight "RightAlt/Option" |
| 335 0x0700e7 0x0086 0xe05c 0x0036 OSRight "RightGUI/Super/Win/Cmd" |
| 336 |
| 337 USB#0700e8 - #07ffff are reserved |
| 338 |
| 339 ================================== |
| 340 USB Usage Page 0x0c: Consumer Page |
| 341 ================================== |
| 342 AL = Application Launch |
| 343 AC = Application Control |
| 344 |
| 345 TODO(garykac): Many XF86 keys have multiple scancodes mapping to them. |
| 346 We need to map all of these into a canonical USB scancode without |
| 347 confusing the reverse-lookup - most likely by simply returning the first |
| 348 found match. |
| 349 |
| 350 TODO(garykac): Find appropriate mappings for: |
| 351 Win#e06b LaunchApp1 (My Computer?) |
| 352 Win#e021 LaunchApp2 (Calculator?) |
| 353 Win#e03c Music - USB#0c0193 is AL_AVCapturePlayback |
| 354 Win#e06d Video - USB#0c0193 is AL_AVCapturePlayback |
| 355 Win#e064 Pictures |
| 356 XKB#0080 XF86LaunchA |
| 357 XKB#0097 XF86WakeUp |
| 358 XKB#0099 XF86Send |
| 359 XKB#009b XF86Xfer |
| 360 XKB#009c XF86Launch1 |
| 361 XKB#009d XF86Launch2 |
| 362 XKB... remaining XF86 keys |
| 363 |
| 364 USB XKB Win Mac Code USB Name |
| 365 0x0c00b5 - 0xe019 - MediaTrackNext |
| 366 0x0c00b6 - 0xe010 - MediaTrackPrevious |
| 367 0x0c00b7 - 0xe024 - MediaStop |
| 368 0x0c00b8 - 0xe02c - Eject |
| 369 0x0c00cd - 0xe022 - MediaPlayPause |
| 370 0x0c018a - 0xe01e - LaunchMail "AL_EmailReader" |
| 371 0x0c0192 0x0094 - - - "AL_Calculator" |
| 372 USB#0c0194: My Computer |
| 373 0x0c0194 0x00a5 - - - "AL_LocalMachineBrowser" |
| 374 0x0c01a7 0x00f3 - - - "AL_Documents" |
| 375 USB#0c01b4: Home Directory |
| 376 0x0c01b4 0x0098 - - - "AL_FileBrowser (Explore
r)" |
| 377 0x0c0221 - 0xe065 - BrowserSearch "AC_Search" |
| 378 0x0c0223 - 0xe032 - BrowserHome "AC_Home" |
| 379 0x0c0224 0x00a6 0xe06a - BrowserBack "AC_Back" |
| 380 0x0c0225 0x00a7 0xe069 - BrowserForward "AC_Forward" |
| 381 0x0c0226 - 0xe068 - BrowserStop "AC_Stop" |
| 382 0x0c0227 0x00b5 0xe067 - BrowserRefresh "AC_Refresh (Reload)" |
| 383 0x0c022a 0x00a4 0xe066 - - "AC_Bookmarks (Favorites
)" |
| 384 0x0c0289 0x00f0 - - - "AC_Reply" |
| 385 0x0c028b 0x00f1 - - - "AC_ForwardMsg (MailForw
ard)" |
| 386 0x0c028c 0x00ef - - - "AC_Send" |
| 387 |
| 388 THE END |
OLD | NEW |