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

Unified Diff: ui/events/keycodes/dom4/dom_values.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/dom_values.txt
diff --git a/ui/events/keycodes/dom4/dom_values.txt b/ui/events/keycodes/dom4/dom_values.txt
new file mode 100644
index 0000000000000000000000000000000000000000..fae10f24f2d6ca62ff58a3ca3ed54e82ede63bdb
--- /dev/null
+++ b/ui/events/keycodes/dom4/dom_values.txt
@@ -0,0 +1,669 @@
+ Copyright 2014 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.
+
+ This is a table of DOM Level 3 .code and .key values, used to generate
+ identifiers (enums) and string tables. These names are defined by:
+
+ [0] DOM Level 3 KeyboardEvent code Values,
+ http://www.w3.org/TR/DOM-Level-3-Events-code/
+ [1] DOM Level 3 KeyboardEvent key Values,
+ http://www.w3.org/TR/DOM-Level-3-Events-key/
+
+ Those references should be consulted on the meaning and usage of these
+ values; this file does not attempt to describe that.
+
+ Additional references:
+
+ [2] Document Object Model (DOM) Level 3 Events Specification,
+ http://www.w3.org/TR/DOM-Level-3-Events/
+ [3] Legacy Keyboard Event Properties,
+ https://dvcs.w3.org/hg/dom3events/raw-file/tip/html/Note-KeyProps.html
+ [4] USB HID Usage Tables,
+ http://www.usb.org/developers/devclass_docs/Hut1_11.pdf
+ [5] Linux <linux/evdev.h>
+ [6] Windows <ime.h> and <winuser.h>
+ [7] OS X <HIToolbox/Events.h>
+
+ DOM3 values are defined as text, but numeric values (enum constants) are
+ useful internally, e.g. for IPC or rapid dispatch. The numeric values
+ are chosen for the convenience of the human reader; there is no need
+ in code for these particular numeric values (other than 0 for NONE), or
+ for .code and .key to have the same numeric values for 'corresponding'
+ names, except to make life a little easier for a human debugger.
+
+ For the most part, the names given in the table here directly match the
+ DOM Level 3 value, and a corresponding enum identifier is generated from
+ the name by converting W3C's CamelCaseStyle to Chromium's C_MACRO_STYLE.
+
+ In this file, lines beginning with white space are comments. Column fields
+ are separated by white space; fields containing white space must be quoted.
+
+ A DOM .code or .key table entry has the form:
+
+ <DOMstring> ['-' <Enum> ['-' <Comment>]]
+
+ where
+
+ <DOMstring> is the value from the W3C document;
+ <Enum> is an optional alternate name used to generate the enumerator;
+ <Comment> is optional additional text.
+
+ An entry with a empty <DOMString> and <Identifier> is ignored; consequently,
+ '-' alone marks an empty field, and an entry beginning with '--' forms a
+ placeholder comment (often used where a USB currently defines a code but
+ W3C does not).
+
+
+ Zero is reserved to mean no value; there is no corresponding DOM string.
+ (This is not the same as the valid DOM .key value 'Unidentified'.)
+
+ # DOM .code DOM .key Comment
+ --- ----------------------- ----------------------- -----------------------
+0x000 -None -None "No value"
+
+
+ Numbers less than 8 should only be used for .key values, and not .code,
+ as this simplifies mapping on systems using xkb for key layout.
+
+ TODO(kpschoedel): 'Unidentified' is not a standard DOM .code value (it IS a
+ .key value), but a small amount of existing code uses that string where no
+ code is present or recognized. Once that code has been refactored to use the
+ enum, remove this entry and clean up the corresponding KeycodeConverter code.
+
+ # DOM .code DOM .key Comment
+ --- ----------------------- ----------------------- -----------------------
+0x001 Unidentified Unidentified
+0x002 --DoNotUseForCode2 Accel
+0x003 --DoNotUseForCode3 - "Use for .key only"
+0x004 --DoNotUseForCode4 - "Use for .key only"
+0x005 --DoNotUseForCode5 - "Use for .key only"
+0x006 --DoNotUseForCode6 - "Use for .key only"
+0x007 --DoNotUseForCode7 - "Use for .key only"
+
+
+ The lowest numeric values are used for .key values that correspond to some
+ of the current most commonly used VKEY_ values, as this may keep switch
+ tables dense. A few of these match ASCII codes as a convenience to a human
+ debugger.
+
+ # DOM .code DOM .key Comment
+ --- ----------------------- ----------------------- -----------------------
+0x008 Backspace Backspace "Labelled Delete on Macs"
+0x009 Tab Tab
+0x00A Enter Enter "Primary Enter or Return"
+0x00B PageUp PageUp
+0x00C PageDown PageDown
+0x00D --Separator Separator ".code = USB 07:009F"
+0x00E Home Home
+0x00F End End
+
+ # DOM .code DOM .key Comment
+ --- ----------------------- ----------------------- -----------------------
+0x010 ArrowUp ArrowUp
+0x011 ArrowDown ArrowDown
+0x012 ArrowLeft ArrowLeft
+0x013 ArrowRight ArrowRight
+0x014 Insert Insert
+0x015 Pause Pause "PC Pause/Break key"
+0x016 MediaPlayPause MediaPlayPause
+0x017 MediaSelect MediaSelect
+0x018 MediaStop MediaStop
+0x019 MediaTrackNext MediaTrackNext
+0x01A MediaTrackPrevious MediaTrackPrevious
+0x01B Escape Escape
+0x01C ContextMenu ContextMenu "USB 07:0065 Application"
+0x01D VolumeMute VolumeMute
+0x01E VolumeDown VolumeDown
+0x01F VolumeUp VolumeUp
+
+
+ Codes for printable keys. For the most part, the numeric values match ASCII
+ for the convenience of human readers.
+
+ # DOM .code DOM .key Comment
+ --- ----------------------- ----------------------- -----------------------
+0x020 Space -
+0x021 --NumpadExclamation -
+0x022 - - '"'
+0x023 --NumpadNumberSign -
+0x024 - - '$'
+0x025 --NumpadPercent -
+0x026 --NumpadAmpersand -
+0x027 Quote -
+0x028 NumpadParenLeft -
+0x029 NumpadParenRight -
+0x02A NumpadMultiply -
+0x02B NumpadAdd -
+0x02C Comma -
+0x02D Minus -
+0x02E Period -
+0x02F Slash -
+
+ # DOM .code DOM .key Comment
+ --- ----------------------- ----------------------- -----------------------
+0x030 Digit0 -
+0x031 Digit1 -
+0x032 Digit2 -
+0x033 Digit3 -
+0x034 Digit4 -
+0x035 Digit5 -
+0x036 Digit6 -
+0x037 Digit7 -
+0x038 Digit8 -
+0x039 Digit9 -
+0x03A --NumpadColon -
+0x03B Semicolon -
+0x03C --NumpadLessThan -
+0x03D Equal -
+0x03E --NumpadGreaterThan -
+0x03F - - '?'
+
+ # DOM .code DOM .key Comment
+ --- ----------------------- ----------------------- -----------------------
+0x040 --NumpadAt -
+0x041 KeyA -
+0x042 KeyB -
+0x043 KeyC -
+0x044 KeyD -
+0x045 KeyE -
+0x046 KeyF -
+0x047 KeyG -
+0x048 KeyH -
+0x049 KeyI -
+0x04A KeyJ -
+0x04B KeyK -
+0x04C KeyL -
+0x04D KeyM -
+0x04E KeyN -
+0x04F KeyO -
+
+ # DOM .code DOM .key Comment
+ --- ----------------------- ----------------------- -----------------------
+0x050 KeyP -
+0x051 KeyQ -
+0x052 KeyR -
+0x053 KeyS -
+0x054 KeyT -
+0x055 KeyU -
+0x056 KeyV -
+0x057 KeyW -
+0x058 KeyX -
+0x059 KeyY -
+0x05A KeyZ -
+0x05B BracketLeft -
+0x05C Backslash -
+0x05D BracketRight -
+0x05E --NumpadCircumflex -
+0x05F - - '_'
+
+ # DOM .code DOM .key Comment
+ --- ----------------------- ----------------------- -----------------------
+0x060 Backquote -
+0x061 IntlBackslash - "USB 07:0064"
+0x062 IntlHash - "USB 07:0032"
+0x063 IntlRo - "USB 07:0087"
+0x064 IntlYen - "USB 07:0089"
+
+
+ Additional miscellaneous values.
+
+ # DOM .code DOM .key Comment
+ --- ----------------------- ----------------------- -----------------------
+0x065 BrowserHome BrowserHome
+0x066 BrowserFavorites BrowserFavorites
+0x067 BrowserSearch BrowserSearch
+0x068 BrowserForward BrowserForward
+0x069 BrowserBack BrowserBack
+0x06A BrowserRefresh BrowserRefresh
+0x06B BrowserStop BrowserStop
+0x06C ScrollLock ScrollLock
+0x06D PrintScreen PrintScreen
+0x06E - BrightnessUp
+0x06F - BrightnessDown
+
+ # DOM .code DOM .key Comment
+ --- ----------------------- ----------------------- -----------------------
+0x070 LaunchMail LaunchMail
+0x071 LaunchApp1 -
+0x072 LaunchApp2 -
+0x073 Eject Eject
+0x074 Power Power
+0x075 - PowerOff
+0x076 Sleep -
+0x077 - Standby
+0x078 - Hibernate
+0x079 WakeUp WakeUp
+0x07A - LogOff
+0x07B --NumpadBraceLeft -
+0x07C --NumpadVerticalBar -
+0x07D --NumpadBraceRight -
+0x07E - - "~"
+0x07F Delete Delete
+
+
+ Modifiers. Most .code values (for physical keys), have 'Left' and 'Right'
+ versions, while .key values do not. For modifier .key values with zero or
+ one corresponding .code, we assign numbers as if there were left and right
+ physical keys anyway, to make them consistent for the human reader.
+
+ On PS/2 and USB keyboards, the physical right Alt key is used for AltGraph,
+ and there are no codes dedicated to AltGraph. The 'OS' values, corresponding
+ to USB 'GUI' keys, are used for Windows keys, Mac Command keys, ChromeOS
+ Search keys, or other system-specific modifiers. See the W3C DOM documents
+ for more information.
+
+ # DOM .code DOM .key Comment
+ --- ----------------------- ----------------------- -----------------------
+0x080 ShiftLeft Shift
+0x081 ShiftRight -
+0x082 ControlLeft Control
+0x083 ControlRight -
+0x084 AltLeft Alt
+0x085 AltRight - "AltGr on many layouts"
+0x086 OSLeft OS
+0x087 OSRight -
+0x088 - Meta
+0x089 - -
+0x08A Super Super
+0x08B - -
+0x08C Hyper Hyper
+0x08D - -
+0x08E - AltGraph
+0x08F - -
+
+ # DOM .code DOM .key Comment
+ --- ----------------------- ----------------------- -----------------------
+0x090 - Symbol
+0x091 - -
+0x092 Fn Fn
+0x093 - -
+0x094 - -
+0x095 - -
+0x096 - -
+0x097 - -
+
+ # DOM .code DOM .key Comment
+ --- ----------------------- ----------------------- -----------------------
+0x098 CapsLock CapsLock
+0x099 NumLock NumLock "Also Mac 'Clear' key"
+0x09A - SymbolLock
+0x09B FLock-FnLock FnLock
+0x09C - -
+0x09D - -
+0x09E - -
+0x09F - -
+
+
+ Additional numeric keypad values.
+
+ # DOM .code DOM .key Comment
+ --- ----------------------- ----------------------- -----------------------
+0x0A0 NumpadClear - "Not Mac 'Clear'"
+0x0A1 NumpadClearEntry -
+0x0A2 NumpadEqual -
+0x0A3 NumpadSubtract -
+0x0A4 NumpadDivide -
+0x0A5 NumpadComma - "USB Thousands separator"
+0x0A6 NumpadDecimal - "USB Decimal separator"
+0x0A7 --NumpadSpace -
+0x0A8 NumpadBackspace -
+0x0A9 --NumpadTab -
+0x0AA NumpadEnter -
+0x0AB NumpadMemoryAdd -
+0x0AC NumpadMemorySubtract -
+0x0AD NumpadMemoryClear -
+0x0AE NumpadMemoryRecall -
+0x0AF NumpadMemoryStore -
+
+ # DOM .code DOM .key Comment
+ --- ----------------------- ----------------------- -----------------------
+0x0B0 Numpad0 -
+0x0B1 Numpad1 -
+0x0B2 Numpad2 -
+0x0B3 Numpad3 -
+0x0B4 Numpad4 -
+0x0B5 Numpad5 -
+0x0B6 Numpad6 -
+0x0B7 Numpad7 -
+0x0B8 Numpad8 -
+0x0B9 Numpad9 -
+0x0BA --NumpadA -
+0x0BB --NumpadB -
+0x0BC --NumpadC -
+0x0BD --NumpadD -
+0x0BE --NumpadE -
+0x0BF --NumpadF -
+
+
+ Input method and internationalization.
+
+ # DOM .code DOM .key Comment
+ --- ----------------------- ----------------------- -----------------------
+0x0C0 NonConvert NonConvert "muhenkan"
+0x0C1 Convert Convert "henkan"
+0x0C2 KanaMode KanaMode "katakana/hiragana/romaji"
+0x0C3 - KanjiMode
+0x0C4 - Romaji
+0x0C5 Lang3 Katakana
+0x0C6 Lang4 Hiragana
+0x0C7 - HiraganaKatakana
+0x0C8 - Zenkaku
+0x0C9 - Hankaku
+0x0CA Lang5 ZenkakuHankaku
+0x0CB - Alphanumeric
+0x0CC - Eisu "[close]"
+0x0CD - Process
+0x0CE - ModeChange
+0x0CF - FinalMode
+
+ # DOM .code DOM .key Comment
+ --- ----------------------- ----------------------- -----------------------
+0x0D0 Lang1 HangulMode "han/yeong"
+0x0D1 Lang2 HanjaMode
+0x0D2 - JunjaMode
+0x0D3 - -
+0x0D4 - AllCandidates
+0x0D5 - SingleCandidate
+0x0D6 - PreviousCandidate
+0x0D7 - NextCandidate
+0x0D8 - GroupFirst
+0x0D9 - GroupLast
+0x0DA - GroupPrevious
+0x0DB - GroupNext
+0x0DC - Compose
+0x0DD - Dead
+0x0DE - CodeInput
+0x0DF - Accept
+
+ # DOM .code DOM .key Comment
+ --- ----------------------- ----------------------- -----------------------
+0x0E0 - -
+0x0E1 - -
+0x0E2 - -
+0x0E3 - -
+0x0E4 - -
+0x0E5 - -
+0x0E6 --Lang6 -
+0x0E7 --Lang7 -
+0x0E8 --Lang8 -
+0x0E9 --Lang9 -
+0x0EA --International6 -
+0x0EB --International7 -
+0x0EC --International8 -
+0x0ED --International9 -
+0x0EE - -
+0x0EF - -
+
+
+ Function keys. DOM defines an open-ended set, but if we want a finite
+ numeric encoding we need to draw the line somewhere. USB and Windows (VK)
+ and Linux (evdev) support 24 and OS X supports 20, so we define 24 and
+ optimistically leave space here for 8 more.
+
+ # DOM .code DOM .key Comment
+ --- ----------------------- ----------------------- -----------------------
+0x0F0 --F0 --F0
+0x0F1 F1 F1
+0x0F2 F2 F2
+0x0F3 F3 F3
+0x0F4 F4 F4
+0x0F5 F5 F5
+0x0F6 F6 F6
+0x0F7 F7 F7
+0x0F8 F8 F8
+0x0F9 F9 F9
+0x0FA F10 F10
+0x0FB F11 F11
+0x0FC F12 F12
+0x0FD F13 F13
+0x0FE F14 F14
+0x0FF F15 F15
+
+ # DOM .code DOM .key Comment
+ --- ----------------------- ----------------------- -----------------------
+0x100 F16 F16
+0x101 F17 F17
+0x102 F18 F18
+0x103 F19 F19
+0x104 F20 F20
+0x105 F21 F21
+0x106 F22 F22
+0x107 F23 F23
+0x108 F24 F24
+0x109 --F25 --F25
+0x10A --F26 --F26
+0x10B --F27 --F27
+0x10C --F28 --F28
+0x10D --F29 --F29
+0x10E --F30 --F30
+0x10F --F31 --F31
+
+
+ Additional keys, mostly described as 'legacy' in the DOM documents.
+
+ # DOM .code DOM .key Comment
+ --- ----------------------- ----------------------- -----------------------
+0x110 Abort -
+0x111 Help Help
+0x112 Copy Copy
+0x113 Cut Cut
+0x114 Paste Paste
+0x115 Undo Undo
+0x116 - Redo
+0x117 Again Again
+0x118 Open Open
+0x119 Props Props
+0x11A Select Select
+0x11B Find Find
+0x11C Suspend -
+0x11D Resume -
+0x11E Turbo -
+0x11F - -
+
+
+ Space for physical key codes defined by USB but not currently by W3C.
+
+ # DOM .code DOM .key Comment
+ --- ----------------------- ----------------------- -----------------------
+0x120 --Numpad00 -
+0x121 --Numpad000 -
+0x122 --NumpadEqualAS400 -
+0x123 --NumpadXor -
+0x124 --NumpadChangeSign -
+0x125 --NumpadMemoryMultiply -
+0x126 --NumpadMemoryDivide -
+0x127 --NumpadDoubleAmpersand -
+0x128 --NumpadDoubleVerticalBar -
+0x129 --NumpadBaseBinary -
+0x12A --NumpadBaseDecimal -
+0x12B --NumpadBaseHexadecimal -
+0x12C --NumpadBaseOctal -
+0x12D --LockingCapsLock -
+0x12E --LockingNumLock -
+0x12F --LockingScrollLock -
+
+ # DOM .code DOM .key Comment
+ --- ----------------------- ----------------------- -----------------------
+0x130 --AlternateErase -
+0x131 --Clear -
+0x132 --Clear/Again -
+0x133 --CurrencySubUnit -
+0x134 --CurrencyUnit -
+0x135 --DecimalSeparator -
+0x136 --ExSel -
+0x137 --Oper -
+0x138 --Out -
+0x139 --Prior -
+0x13A --Return -
+0x13B --Stop -
+0x13C --SysReq -
+0x13D --ThousandsSeparator -
+0x13E - -
+0x13F - -
+
+
+ Additional DOM .key values.
+
+ # DOM .code DOM .key Comment
+ --- ----------------------- ----------------------- -----------------------
+0x140 - Attn
+0x141 - Camera
+0x142 - Cancel
+0x143 - Close
+0x144 - Execute
+0x145 - MailReply
+0x146 - MailSend
+0x147 - MailForward
+0x148 - New
+0x149 - Play "not MediaPlay"
+0x14A - Print
+0x14B - Save
+0x14C - SpellCheck
+0x14D - ZoomToggle
+0x14E - ZoomIn
+0x14F - ZoomOut
+
+ # DOM .code DOM .key Comment
+ --- ----------------------- ----------------------- -----------------------
+0x150 - LaunchCalculator
+0x151 - LaunchCalendar
+0x152 - LaunchMediaPlayer
+0x153 - LaunchMusicPlayer
+0x154 - LaunchMyComputer
+0x155 - LaunchScreenSaver
+0x156 - LaunchSpreadsheet
+0x157 - LaunchWebBrowser
+0x158 - LaunchWebCam
+0x159 - LaunchWordProcessor
+0x15A - -
+0x15B - -
+0x15C - -
+0x15D - -
+0x15E - -
+0x15F - -
+
+ # DOM .code DOM .key Comment
+ --- ----------------------- ----------------------- -----------------------
+0x160 - AudioBalanceLeft
+0x161 - AudioBalanceRight
+0x162 - AudioBassBoostDown
+0x163 - AudioBassBoostUp
+0x164 - AudioFaderFront
+0x165 - AudioFaderRear
+0x166 - AudioSurroundModeNext
+0x167 - AVRInput
+0x168 - AVRPower
+0x169 - ChannelDown
+0x16A - ChannelUp
+0x16B - Clear
+0x16C - ClosedCaptionToggle
+0x16D - CrSel
+0x16E - ExSel
+0x16F - EraseEof
+
+ # DOM .code DOM .key Comment
+ --- ----------------------- ----------------------- -----------------------
+0x170 - ColorF0Red
+0x171 - ColorF1Green
+0x172 - ColorF2Yellow
+0x173 - ColorF3Blue
+0x174 - ColorF4Grey
+0x175 - ColorF5Brown
+0x176 - Dimmer
+0x177 - DisplaySwap
+0x178 - Exit
+0x179 - Guide
+0x17A - GuideNextDay
+0x17B - GuidePreviousDay
+0x17C - Info
+0x17D - InstantReplay
+0x17E - Link
+0x17F - ListProgram
+
+ # DOM .code DOM .key Comment
+ --- ----------------------- ----------------------- -----------------------
+0x180 - FavoriteClear0
+0x181 - FavoriteClear1
+0x182 - FavoriteClear2
+0x183 - FavoriteClear3
+0x184 - FavoriteRecall0
+0x185 - FavoriteRecall1
+0x186 - FavoriteRecall2
+0x187 - FavoriteRecall3
+0x188 - FavoriteStore0
+0x189 - FavoriteStore1
+0x18A - FavoriteStore2
+0x18B - FavoriteStore3
+0x18C - -
+0x18D - -
+0x18E - -
+0x18F - -
+
+ # DOM .code DOM .key Comment
+ --- ----------------------- ----------------------- -----------------------
+0x190 - MediaApps
+0x191 - MediaFastForward
+0x192 - MediaLast
+0x193 - MediaNextTrack
+0x194 - MediaPause
+0x195 - MediaPlay
+0x196 - MediaPreviousTrack
+0x197 - MediaRecord
+0x198 - MediaRewind
+0x199 - MediaSkip
+0x19A - -
+0x19B - -
+0x19C - -
+0x19D - -
+0x19E - -
+0x19F - -
+
+ # DOM .code DOM .key Comment
+ --- ----------------------- ----------------------- -----------------------
+0x1A0 - LiveContent
+0x1A1 - Lock
+0x1A2 - NextFavoriteChannel
+0x1A3 - NextUserProfile
+0x1A4 - OnDemand
+0x1A5 - PinPDown
+0x1A6 - PinPMove
+0x1A7 - PinPToggle
+0x1A8 - PinPUp
+0x1A9 - PlaySpeedDown
+0x1AA - PlaySpeedReset
+0x1AB - PlaySpeedUp
+0x1AC - RandomToggle
+0x1AD - RcLowBattery
+0x1AE - RecordSpeedNext
+0x1AF - RfBypass
+
+ # DOM .code DOM .key Comment
+ --- ----------------------- ----------------------- -----------------------
+0x1B0 - ScanChannelsToggle
+0x1B1 - ScreenModeNext
+0x1B2 - Settings
+0x1B3 - SplitScreenToggle
+0x1B4 - STBInput
+0x1B5 - STBPower
+0x1B6 - Subtitle
+0x1B7 - Teletext
+0x1B8 - TV
+0x1B9 - TVInput
+0x1BA - TVPower
+0x1BB - VideoModeNext
+0x1BC - Wink
+0x1BD - -
+0x1BE - -
+0x1BF - -
+
+ # DOM .code DOM .key Comment
+ --- ----------------------- ----------------------- -----------------------
+0x1F0 - -
+0x1F1 - Soft1
+0x1F2 - Soft2
+0x1F3 - Soft3
+0x1F4 - Soft4
+
+ THE END
+

Powered by Google App Engine
This is Rietveld 408576698