Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(805)

Unified Diff: ui/events/keycodes/dom4/native_codes.txt

Issue 641753003: DOM Level 3 .code and .key value enumerations. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ui/events/keycodes/dom4/native_codes.txt
diff --git a/ui/events/keycodes/dom4/native_codes.txt b/ui/events/keycodes/dom4/native_codes.txt
new file mode 100644
index 0000000000000000000000000000000000000000..b92eb3ad74b08a3fe914b4b624f1202dcea98c08
--- /dev/null
+++ b/ui/events/keycodes/dom4/native_codes.txt
@@ -0,0 +1,388 @@
+ Copyright 2013 The Chromium Authors. All rights reserved.
+ Use of this source code is governed by a BSD-style license that can be
+ found in the LICENSE file.
+
+ Data in this file was created by referencing:
+ USB HID Usage Tables (v1.11) 27 June 2001
+ HIToolbox/Events.h (Mac)
+
+ The first entry must provide the invalid code for each platform.
+
+ USB XKB Win Mac Code USB Name
+0x000000 0x0000 0x0000 0xffff - "Invalid"
+
+ =========================================
+ USB Usage Page 0x01: Generic Desktop Page
+ =========================================
+
+ Sleep could be encoded as USB#0c0032, but there's no corresponding WakeUp
+ in the 0x0c USB page.
+
+ USB XKB Win Mac Code USB Name
+0x010082 0x0096 - - - "SystemSleep"
+0x010083 0x0097 - - - "SystemWakeUp"
+
+ =========================================
+ USB Usage Page 0x07: Keyboard/Keypad Page
+ =========================================
+
+ TODO(garykac):
+ XKB#005c ISO Level3 Shift (AltGr)
+ XKB#005e <>||
+ XKB#006d Linefeed
+ XKB#008a SunProps cf. USB#0700a3 CrSel/Props
+ XKB#008e SunOpen
+ Mac#003f kVK_Function
+ Mac#000a kVK_ISO_Section (ISO keyboards only)
+ Mac#0066 kVK_JIS_Eisu (USB#07008a Henkan?)
+
+ USB XKB Win Mac Code USB Name
+0x070000 - - - - "Reserved"
+0x070001 - - - - "ErrorRollOver"
+0x070002 - - - - "POSTFail"
+0x070003 - - - - "ErrorUndefined"
+0x070004 0x0026 0x001e 0x0000 KeyA "aA"
+0x070005 0x0038 0x0030 0x000b KeyB "bB"
+0x070006 0x0036 0x002e 0x0008 KeyC "cC"
+0x070007 0x0028 0x0020 0x0002 KeyD "dD"
+
+ USB XKB Win Mac Code USB Name
+0x070008 0x001a 0x0012 0x000e KeyE "eE"
+0x070009 0x0029 0x0021 0x0003 KeyF "fF"
+0x07000a 0x002a 0x0022 0x0005 KeyG "gG"
+0x07000b 0x002b 0x0023 0x0004 KeyH "hH"
+0x07000c 0x001f 0x0017 0x0022 KeyI "iI"
+0x07000d 0x002c 0x0024 0x0026 KeyJ "jJ"
+0x07000e 0x002d 0x0025 0x0028 KeyK "kK"
+0x07000f 0x002e 0x0026 0x0025 KeyL "lL"
+
+ USB XKB Win Mac Code USB Name
+0x070010 0x003a 0x0032 0x002e KeyM "mM"
+0x070011 0x0039 0x0031 0x002d KeyN "nN"
+0x070012 0x0020 0x0018 0x001f KeyO "oO"
+0x070013 0x0021 0x0019 0x0023 KeyP "pP"
+0x070014 0x0018 0x0010 0x000c KeyQ "qQ"
+0x070015 0x001b 0x0013 0x000f KeyR "rR"
+0x070016 0x0027 0x001f 0x0001 KeyS "sS"
+0x070017 0x001c 0x0014 0x0011 KeyT "tT"
+
+ USB XKB Win Mac Code USB Name
+0x070018 0x001e 0x0016 0x0020 KeyU "uU"
+0x070019 0x0037 0x002f 0x0009 KeyV "vV"
+0x07001a 0x0019 0x0011 0x000d KeyW "wW"
+0x07001b 0x0035 0x002d 0x0007 KeyX "xX"
+0x07001c 0x001d 0x0015 0x0010 KeyY "yY"
+0x07001d 0x0034 0x002c 0x0006 KeyZ "zZ"
+0x07001e 0x000a 0x0002 0x0012 Digit1 "1!"
+0x07001f 0x000b 0x0003 0x0013 Digit2 "2@"
+
+ USB XKB Win Mac Code USB Name
+0x070020 0x000c 0x0004 0x0014 Digit3 "3#"
+0x070021 0x000d 0x0005 0x0015 Digit4 "4$"
+0x070022 0x000e 0x0006 0x0017 Digit5 "5%"
+0x070023 0x000f 0x0007 0x0016 Digit6 "6^"
+0x070024 0x0010 0x0008 0x001a Digit7 "7&"
+0x070025 0x0011 0x0009 0x001c Digit8 "8*"
+0x070026 0x0012 0x000a 0x0019 Digit9 "9("
+0x070027 0x0013 0x000b 0x001d Digit0 "0)"
+
+ USB XKB Win Mac Code USB Name
+0x070028 0x0024 0x001c 0x0024 Enter
+0x070029 0x0009 0x0001 0x0035 Escape
+0x07002a 0x0016 0x000e 0x0033 Backspace
+0x07002b 0x0017 0x000f 0x0030 Tab
+0x07002c 0x0041 0x0039 0x0031 Space "Spacebar"
+0x07002d 0x0014 0x000c 0x001b Minus "-_"
+0x07002e 0x0015 0x000d 0x0018 Equal "=+"
+0x07002f 0x0022 0x001a 0x0021 BracketLeft "[{"
+
+ USB XKB Win Mac Code USB Name
+0x070030 0x0023 0x001b 0x001e BracketRight "]}"
+0x070031 0x0033 0x002b 0x002a Backslash "\\| (US keyboard only)"
+
+ USB#070032 never appears on keyboards that have USB#070031.
+ Platforms use the same scancode as for the two keys.
+ The keycap varies on international keyboards:
+ Dan: '* Dutch: <> Ger: #' UK: #~
+ TODO(garykac): Verify Mac intl keyboard.
+
+ USB XKB Win Mac Code USB Name
+ 070032 0x0033 0x002b 0x002a IntlHash "#~ (Non-US)"
+0x070033 0x002f 0x0027 0x0029 Semicolon ";:"
+0x070034 0x0030 0x0028 0x0027 Quote '\'"'
+0x070035 0x0031 0x0029 0x0032 Backquote "`~"
+0x070036 0x003b 0x0033 0x002b Comma ",<"
+0x070037 0x003c 0x0034 0x002f Period ".>"
+
+ USB XKB Win Mac Code USB Name
+0x070038 0x003d 0x0035 0x002c Slash "/?"
+0x070039 0x0042 0x003a 0x0039 CapsLock
+0x07003a 0x0043 0x003b 0x007a F1
+0x07003b 0x0044 0x003c 0x0078 F2
+0x07003c 0x0045 0x003d 0x0063 F3
+0x07003d 0x0046 0x003e 0x0076 F4
+0x07003e 0x0047 0x003f 0x0060 F5
+0x07003f 0x0048 0x0040 0x0061 F6
+
+ USB XKB Win Mac Code USB Name
+0x070040 0x0049 0x0041 0x0062 F7
+0x070041 0x004a 0x0042 0x0064 F8
+0x070042 0x004b 0x0043 0x0065 F9
+0x070043 0x004c 0x0044 0x006d F10
+0x070044 0x005f 0x0057 0x0067 F11
+0x070045 0x0060 0x0058 0x006f F12
+ PrintScreen is effectively F13 on Mac OS X.
+0x070046 0x006b 0xe037 - PrintScreen
+0x070047 0x004e 0x0046 - ScrollLock
+
+ USB XKB Win Mac Code USB Name
+0x070048 0x007f - - Pause
+ Labeled "Help/Insert" on Mac.
+0x070049 0x0076 0xe052 0x0072 Insert
+0x07004a 0x006e 0xe047 0x0073 Home
+0x07004b 0x0070 0xe049 0x0074 PageUp
+ Delete (Forward Delete)
+0x07004c 0x0077 0xe053 0x0075 Delete
+0x07004d 0x0073 0xe04f 0x0077 End
+0x07004e 0x0075 0xe051 0x0079 PageDown
+0x07004f 0x0072 0xe04d 0x007c ArrowRight
+
+ USB XKB Win Mac Code USB Name
+0x070050 0x0071 0xe04b 0x007b ArrowLeft
+0x070051 0x0074 0xe050 0x007d ArrowDown
+0x070052 0x006f 0xe048 0x007e ArrowUp
+0x070053 0x004d 0x0045 0x0047 NumLock "Keypad_NumLock Clear"
+0x070054 0x006a 0xe035 0x004b NumpadDivide "Keypad_/"
+0x070055 0x003f 0x0037 0x0043 NumpadMultiply "Keypad_*"
+0x070056 0x0052 0x004a 0x004e NumpadSubtract "Keypad_-"
+0x070057 0x0056 0x004e 0x0045 NumpadAdd "Keypad_+"
+
+ USB XKB Win Mac Code USB Name
+0x070058 0x0068 0xe01c 0x004c NumpadEnter "Keypad_Enter"
+0x070059 0x0057 0x004f 0x0053 Numpad1 "Keypad_1 End"
+0x07005a 0x0058 0x0050 0x0054 Numpad2 "Keypad_2 DownArrow"
+0x07005b 0x0059 0x0051 0x0055 Numpad3 "Keypad_3 PageDown"
+0x07005c 0x0053 0x004b 0x0056 Numpad4 "Keypad_4 LeftArrow"
+0x07005d 0x0054 0x004c 0x0057 Numpad5 "Keypad_5"
+0x07005e 0x0055 0x004d 0x0058 Numpad6 "Keypad_6 RightArrow"
+0x07005f 0x004f 0x0047 0x0059 Numpad7 "Keypad_7 Home"
+
+ USB XKB Win Mac Code USB Name
+0x070060 0x0050 0x0048 0x005b Numpad8 "Keypad_8 UpArrow"
+0x070061 0x0051 0x0049 0x005c Numpad9 "Keypad_9 PageUp"
+0x070062 0x005a 0x0052 0x0052 Numpad0 "Keypad_0 Insert"
+0x070063 0x005b 0x0053 0x0041 NumpadDecimal "Keypad_. Delete"
+ USB#070064 is not present on US keyboard.
+ This key is typically located near LeftShift key.
+ The keycap varies on international keyboards:
+ Dan: <> Dutch: ][ Ger: <> UK: \|
+0x070064 0x005e 0x0056 0x000a IntlBackslash "Non-US \|"
+ AppMenu (next to RWin key)
+0x070065 0x0087 0xe05d 0x006e ContextMenu
+0x070066 0x007c - - Power
+0x070067 0x007d - 0x0051 NumpadEqual "Keypad_="
+
+ USB XKB Win Mac Code USB Name
+0x070068 - 0x005b 0x0069 F13
+0x070069 - 0x005c 0x006b F14
+0x07006a - 0x005d 0x0071 F15
+0x07006b - 0x0063 0x006a F16
+0x07006c - 0x0064 0x0040 F17
+0x07006d - 0x0065 0x004f F18
+0x07006e - 0x0066 0x0050 F19
+0x07006f - 0x0067 0x005a F20
+
+ USB XKB Win Mac Code USB Name
+0x070070 - 0x0068 - F21
+0x070071 - 0x0069 - F22
+0x070072 - 0x006a - F23
+0x070073 - 0x006b - F24
+0x070074 - - - - "Execute"
+0x070075 0x0092 0xe03b - Help
+0x070076 0x0093 - - - "Menu"
+ 070077 - - - - "Select"
+
+ USB XKB Win Mac Code USB Name
+ 070078 - - - - "Stop"
+0x070079 0x0089 - - - "Again (Redo)"
+0x07007a 0x008b 0xe008 - Undo
+0x07007b 0x0091 0xe017 - Cut
+0x07007c 0x008d 0xe018 - Copy
+0x07007d 0x008f 0xe00a - Paste
+0x07007e 0x0090 - - - "Find"
+0x07007f 0x0079 0xe020 0x004a VolumeMute
+
+ USB XKB Win Mac Code USB Name
+0x070080 0x007b 0xe030 0x0048 VolumeUp
+0x070081 0x007a 0xe02e 0x0049 VolumeDown
+ 070082 - - - - "LockingCapsLock"
+ 070083 - - - - "LockingNumLock"
+ 070084 - - - - "LockingScrollLock"
+ USB#070085 is used as Brazilian Keypad_.
+0x070085 - - 0x005f NumpadComma "Keypad_Comma"
+
+ USB#070086 is used on AS/400 keyboards. Standard Keypad_= is USB#070067.
+ 070086 - - - - "Keypad_="
+
+ USB#070087 International1 is used for Brazilian /? and Japanese _ 'ro'.
+0x070087 0x0061 - 0x005e IntlRo "International1"
+ USB#070088 is used as Japanese Hiragana/Katakana key.
+0x070088 0x0065 - 0x0068 KanaMode "International2"
+ USB#070089 is used as Japanese Yen key.
+0x070089 0x0084 0x007d 0x005d IntlYen "International3"
+ USB#07008a is used as Japanese Henkan (Convert) key.
+0x07008a 0x0064 - - Convert "International4"
+ USB#07008b is used as Japanese Muhenkan (No-convert) key.
+0x07008b 0x0066 - - NonConvert "International5"
+ 07008c - - - - "International6"
+ 07008d - - - - "International7"
+ 07008e - - - - "International8"
+ 07008f - - - - "International9"
+
+0x070090 0x0082 - - Lang1 "Hangul"
+0x070091 0x0083 - - Lang2 "Hanja"
+0x070092 0x0062 - - Lang3 "Katakana"
+0x070093 0x0063 - - Lang4 "Hiragana"
+0x070094 - - - Lang5 "Zenkaku/Hankaku"
+ 070095 - - - - "LANG6"
+ 070096 - - - - "LANG7"
+ 070097 - - - - "LANG8"
+ 070098 - - - - "LANG9"
+
+ USB XKB Win Mac Code USB Name
+ 070099 - - - - "AlternateErase"
+ 07009a - - - - "SysReq/Attention"
+0x07009b 0x0088 - - Abort
+ 07009c - - - - "Clear"
+ 07009d - - - - "Prior"
+ 07009e - - - - "Return"
+ 07009f - - - - "Separator"
+
+ USB XKB Win Mac Code USB Name
+ 0700a0 - - - - "Out"
+ 0700a1 - - - - "Oper"
+ 0700a2 - - - - "Clear/Again"
+ 0700a3 - - - - "CrSel/Props"
+ 0700a4 - - - - "ExSel"
+
+ USB XKB Win Mac Code USB Name
+ 0700b0 - - - - "Keypad_00"
+ 0700b1 - - - - "Keypad_000"
+ 0700b2 - - - - "ThousandsSeparator"
+ 0700b3 - - - - "DecimalSeparator"
+ 0700b4 - - - - "CurrencyUnit"
+ 0700b5 - - - - "CurrencySubunit"
+0x0700b6 0x00bb - - NumpadParenLeft "Keypad_("
+0x0700b7 0x00bc - - NumpadParenRight "Keypad_)"
+
+ USB XKB Win Mac Code USB Name
+ 0700b8 - - - - "Keypad_{"
+ 0700b9 - - - - "Keypad_}"
+ 0700ba - - - - "Keypad_Tab"
+ 0700bb - - - - "Keypad_Backspace"
+ 0700bc - - - - "Keypad_A"
+ 0700bd - - - - "Keypad_B"
+ 0700be - - - - "Keypad_C"
+ 0700bf - - - - "Keypad_D"
+
+ USB XKB Win Mac Code USB Name
+ 0700c0 - - - - "Keypad_E"
+ 0700c1 - - - - "Keypad_F"
+ 0700c2 - - - - "Keypad_Xor"
+ 0700c3 - - - - "Keypad_^"
+ 0700c4 - - - - "Keypad_%"
+ 0700c5 - - - - "Keypad_<"
+ 0700c6 - - - - "Keypad_>"
+ 0700c7 - - - - "Keypad_&"
+
+ USB XKB Win Mac Code USB Name
+ 0700c8 - - - - "Keypad_&&"
+ 0700c9 - - - - "Keypad_|"
+ 0700ca - - - - "Keypad_||"
+ 0700cb - - - - "Keypad_:"
+ 0700cc - - - - "Keypad_#"
+ 0700cd - - - - "Keypad_Space"
+ 0700ce - - - - "Keypad_@"
+ 0700cf - - - - "Keypad_!"
+
+ USB XKB Win Mac Code USB Name
+ 0700d0 - - - - "Keypad_MemoryStore"
+ 0700d1 - - - - "Keypad_MemoryRecall"
+ 0700d2 - - - - "Keypad_MemoryClear"
+ 0700d3 - - - - "Keypad_MemoryAdd"
+ 0700d4 - - - - "Keypad_MemorySubtract"
+ 0700d5 - - - - "Keypad_MemoryMultiply"
+ 0700d6 - - - - "Keypad_MemoryDivide"
+0x0700d7 0x007e - - --NumpadChangeSign "Keypad_+/-"
+
+ USB XKB Win Mac Code USB Name
+ 0700d8 - - - - "Keypad_Clear"
+ 0700d9 - - - - "Keypad_ClearEntry"
+ 0700da - - - - "Keypad_Binary"
+ 0700db - - - - "Keypad_Octal"
+0x0700dc 0x0081 - - - "Keypad_Decimal"
+ 0700dd - - - - "Keypad_Hexadecimal"
+ USB#0700de - #0700df are reserved.
+
+ USB XKB Win Mac Code USB Name
+0x0700e0 0x0025 0x001d 0x003b ControlLeft
+0x0700e1 0x0032 0x002a 0x0038 ShiftLeft
+0x0700e2 0x0040 0x0038 0x003a AltLeft "LeftAlt/Option"
+0x0700e3 0x0085 0xe05b 0x0037 OSLeft "LeftGUI/Super/Win/Cmd"
+0x0700e4 0x0069 0xe01d 0x003e ControlRight
+0x0700e5 0x003e 0x0036 0x003c ShiftRight
+0x0700e6 0x006c 0xe038 0x003d AltRight "RightAlt/Option"
+0x0700e7 0x0086 0xe05c 0x0036 OSRight "RightGUI/Super/Win/Cmd"
+
+ USB#0700e8 - #07ffff are reserved
+
+ ==================================
+ USB Usage Page 0x0c: Consumer Page
+ ==================================
+ AL = Application Launch
+ AC = Application Control
+
+ TODO(garykac): Many XF86 keys have multiple scancodes mapping to them.
+ We need to map all of these into a canonical USB scancode without
+ confusing the reverse-lookup - most likely by simply returning the first
+ found match.
+
+ TODO(garykac): Find appropriate mappings for:
+ Win#e06b LaunchApp1 (My Computer?)
+ Win#e021 LaunchApp2 (Calculator?)
+ Win#e03c Music - USB#0c0193 is AL_AVCapturePlayback
+ Win#e06d Video - USB#0c0193 is AL_AVCapturePlayback
+ Win#e064 Pictures
+ XKB#0080 XF86LaunchA
+ XKB#0097 XF86WakeUp
+ XKB#0099 XF86Send
+ XKB#009b XF86Xfer
+ XKB#009c XF86Launch1
+ XKB#009d XF86Launch2
+ XKB... remaining XF86 keys
+
+ USB XKB Win Mac Code USB Name
+0x0c00b5 - 0xe019 - MediaTrackNext
+0x0c00b6 - 0xe010 - MediaTrackPrevious
+0x0c00b7 - 0xe024 - MediaStop
+0x0c00b8 - 0xe02c - Eject
+0x0c00cd - 0xe022 - MediaPlayPause
+0x0c018a - 0xe01e - LaunchMail "AL_EmailReader"
+0x0c0192 0x0094 - - - "AL_Calculator"
+ USB#0c0194: My Computer
+0x0c0194 0x00a5 - - - "AL_LocalMachineBrowser"
+0x0c01a7 0x00f3 - - - "AL_Documents"
+ USB#0c01b4: Home Directory
+0x0c01b4 0x0098 - - - "AL_FileBrowser (Explorer)"
+0x0c0221 - 0xe065 - BrowserSearch "AC_Search"
+0x0c0223 - 0xe032 - BrowserHome "AC_Home"
+0x0c0224 0x00a6 0xe06a - BrowserBack "AC_Back"
+0x0c0225 0x00a7 0xe069 - BrowserForward "AC_Forward"
+0x0c0226 - 0xe068 - BrowserStop "AC_Stop"
+0x0c0227 0x00b5 0xe067 - BrowserRefresh "AC_Refresh (Reload)"
+0x0c022a 0x00a4 0xe066 - - "AC_Bookmarks (Favorites)"
+0x0c0289 0x00f0 - - - "AC_Reply"
+0x0c028b 0x00f1 - - - "AC_ForwardMsg (MailForward)"
+0x0c028c 0x00ef - - - "AC_Send"
+
+ THE END

Powered by Google App Engine
This is Rietveld 408576698