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

Side by Side Diff: ui/events/keycodes/dom3/dom_key.h

Issue 641753003: DOM Level 3 .code and .key value enumerations. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove generator script Created 6 years, 1 month 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2014 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_DOM3_DOM_KEY_H_
6 #define UI_EVENTS_KEYCODES_DOM3_DOM_KEY_H_
7
8 // DOM Level 3 .key value enumeration constants, as defined by:
9 //
10 // [0] DOM Level 3 KeyboardEvent key Values,
11 // http://www.w3.org/TR/DOM-Level-3-Events-key/
12 //
13 // That reference should be consulted on the meaning and usage of these
14 // values; this file does not attempt to describe that.
15 //
16 // Additional references:
17 //
18 // [1] Document Object Model (DOM) Level 3 Events Specification,
19 // http://www.w3.org/TR/DOM-Level-3-Events/
20 // [2] DOM Level 3 KeyboardEvent code Values,
21 // http://www.w3.org/TR/DOM-Level-3-Events-code/
22 // [3] Legacy Keyboard Event Properties,
23 // https://dvcs.w3.org/hg/dom3events/raw-file/tip/html/Note-KeyProps.html
24 // [4] USB HID Usage Tables,
25 // http://www.usb.org/developers/devclass_docs/Hut1_11.pdf
26 // [5] Linux <linux/evdev.h>
27 // [6] Windows <ime.h> and <winuser.h>
28 // [7] OS X <HIToolbox/Events.h>
29 //
30 // DOM3 values are defined as text, but numeric values (enum constants) are
31 // useful internally, e.g. for IPC or rapid dispatch. The numeric values
32 // are chosen for the convenience of the human reader; there is no need
33 // in code for these particular numeric values (other than 0 for NONE).
34 //
35 // The enum identifiers are systematically derived from the W3C names by
36 // inserting an underscore between consecutive 'words' and converting to
37 // upper case.
38 //
39 // This file is organized following the sections of [0], and a few integer
40 // values are unused between sections to allow for small additions.
41 //
42 // When adding a value, be sure to add it to the string table in
43 // keycode_converter.cc as well.
44
45 namespace ui {
46
47 enum class DomKey {
Wez 2014/10/31 21:12:52 As for the keycode conversion table, let's have a
kpschoedel 2014/10/31 21:36:52 Sure; I had included explicit values in my origina
48 // Zero is reserved to mean no value; there is no corresponding DOM string.
49 // (This is not the same as the valid DOM .key value 'Unidentified'.)
50 NONE = 0x000,
51
52 // Special Key Values
53 // http://www.w3.org/TR/DOM-Level-3-Events-key/#keys-special
54 UNIDENTIFIED = 0x001, // Unidentified
55
56 // Modifier Keys
57 // http://www.w3.org/TR/DOM-Level-3-Events-key/#keys-modifier
58 ACCEL = 0x004, // Accel
59 ALT = 0x005, // Alt
60 ALT_GRAPH = 0x006, // AltGraph
61 CAPS_LOCK = 0x007, // CapsLock
62 CONTROL = 0x008, // Control
63 FN = 0x009, // Fn
64 FN_LOCK = 0x00A, // FnLock
65 HYPER = 0x00B, // Hyper
66 META = 0x00C, // Meta
67 NUM_LOCK = 0x00D, // NumLock
68 OS = 0x00E, // OS
69 SCROLL_LOCK = 0x00F, // ScrollLock
70 SHIFT = 0x010, // Shift
71 SUPER = 0x011, // Super
72 SYMBOL = 0x012, // Symbol
73 SYMBOL_LOCK = 0x013, // SymbolLock
74
75 // Whitespace Keys
76 // http://www.w3.org/TR/DOM-Level-3-Events-key/#keys-whitespace
77 ENTER = 0x018, // Enter
78 SEPARATOR = 0x019, // Separator
79 TAB = 0x01A, // Tab
80
81 // Navigation Keys
82 // http://www.w3.org/TR/DOM-Level-3-Events-key/#keys-navigation
83 ARROW_DOWN = 0x01C, // ArrowDown
84 ARROW_LEFT = 0x01D, // ArrowLeft
85 ARROW_RIGHT = 0x01E, // ArrowRight
86 ARROW_UP = 0x01F, // ArrowUp
87 END = 0x020, // End
88 HOME = 0x021, // Home
89 PAGE_DOWN = 0x022, // PageDown
90 PAGE_UP = 0x023, // PageUp
91
92 // Editing Keys
93 // http://www.w3.org/TR/DOM-Level-3-Events-key/#keys-editing
94 BACKSPACE = 0x024, // Backspace
95 CLEAR = 0x025, // Clear
96 COPY = 0x026, // Copy
97 CR_SEL = 0x027, // CrSel
98 CUT = 0x028, // Cut
99 DELETE = 0x029, // Delete
100 ERASE_EOF = 0x02A, // EraseEof
101 EX_SEL = 0x02B, // ExSel
102 INSERT = 0x02C, // Insert
103 PASTE = 0x02D, // Paste
104 REDO = 0x02E, // Redo
105 UNDO = 0x02F, // Undo
106
107 // UI Keys
108 // http://www.w3.org/TR/DOM-Level-3-Events-key/#keys-ui
109 ACCEPT = 0x030, // Accept
110 AGAIN = 0x031, // Again
111 ATTN = 0x032, // Attn
112 CANCEL = 0x033, // Cancel
113 CONTEXT_MENU = 0x034, // ContextMenu
114 ESCAPE = 0x035, // Escape
115 EXECUTE = 0x036, // Execute
116 FIND = 0x037, // Find
117 HELP = 0x038, // Help
118 PAUSE = 0x039, // Pause
119 PLAY = 0x03A, // Play
120 PROPS = 0x03B, // Props
121 SELECT = 0x03C, // Select
122 ZOOM_IN = 0x03D, // ZoomIn
123 ZOOM_OUT = 0x03E, // ZoomOut
124
125 // Device Keys
126 // http://www.w3.org/TR/DOM-Level-3-Events-key/#keys-device
127 BRIGHTNESS_DOWN = 0x040, // BrightnessDown
128 BRIGHTNESS_UP = 0x041, // BrightnessUp
129 CAMERA = 0x042, // Camera
130 EJECT = 0x043, // Eject
131 LOG_OFF = 0x044, // LogOff
132 POWER = 0x045, // Power
133 POWER_OFF = 0x046, // PowerOff
134 PRINT_SCREEN = 0x047, // PrintScreen
135 HIBERNATE = 0x048, // Hibernate
136 STANDBY = 0x049, // Standby
137 WAKE_UP = 0x04A, // WakeUp
138
139 // IME and Composition Keys
140 // http://www.w3.org/TR/DOM-Level-3-Events-key/#keys-composition
141 ALL_CANDIDATES = 0x050, // AllCandidates
142 ALPHANUMERIC = 0x051, // Alphanumeric
143 CODE_INPUT = 0x052, // CodeInput
144 COMPOSE = 0x053, // Compose
145 CONVERT = 0x054, // Convert
146 DEAD = 0x055, // Dead
147 FINAL_MODE = 0x056, // FinalMode
148 GROUP_FIRST = 0x057, // GroupFirst
149 GROUP_LAST = 0x058, // GroupLast
150 GROUP_NEXT = 0x059, // GroupNext
151 GROUP_PREVIOUS = 0x05A, // GroupPrevious
152 MODE_CHANGE = 0x05B, // ModeChange
153 NEXT_CANDIDATE = 0x05C, // NextCandidate
154 NON_CONVERT = 0x05D, // NonConvert
155 PREVIOUS_CANDIDATE = 0x05E, // PreviousCandidate
156 PROCESS = 0x05F, // Process
157 SINGLE_CANDIDATE = 0x060, // SingleCandidate
158
159 // Keys specific to Korean keyboards:
160 HANGUL_MODE = 0x063, // HangulMode
161 HANJA_MODE = 0x064, // HanjaMode
162 JUNJA_MODE = 0x065, // JunjaMode
163
164 // Keys specific to Japanese keyboards
165 EISU = 0x066, // Eisu
166 HANKAKU = 0x067, // Hankaku
167 HIRAGANA = 0x068, // Hiragana
168 HIRAGANA_KATAKANA = 0x069, // HiraganaKatakana
169 KANA_MODE = 0x06A, // KanaMode
170 KANJI_MODE = 0x06B, // KanjiMode
171 KATAKANA = 0x06C, // Katakana
172 ROMAJI = 0x06D, // Romaji
173 ZENKAKU = 0x06E, // Zenkaku
174 ZENKAKU_HANKAKU = 0x06F, // ZenkakuHankaku
175
176 // General-Purpose Function Keys
177 // http://www.w3.org/TR/DOM-Level-3-Events-key/#keys-function
178 //
179 // DOM defines open-ended sets, but if we want a finite numeric encoding we
180 // need to draw the line somewhere. USB and Windows (VK) and Linux (evdev) all
181 // support 24, so we define 24 and optimistically leave space for another 8.
182 // For soft keys, we define 8 and leave consecutive space for 8.
183 F1 = 0x071, // F1
184 F2 = 0x072, // F2
185 F3 = 0x073, // F3
186 F4 = 0x074, // F4
187 F5 = 0x075, // F5
188 F6 = 0x076, // F6
189 F7 = 0x077, // F7
190 F8 = 0x078, // F8
191 F9 = 0x079, // F9
192 F10 = 0x07A, // F10
193 F11 = 0x07B, // F11
194 F12 = 0x07C, // F12
195 F13 = 0x07D, // F13
196 F14 = 0x07E, // F14
197 F15 = 0x07F, // F15
198 F16 = 0x080, // F16
199 F17 = 0x081, // F17
200 F18 = 0x082, // F18
201 F19 = 0x083, // F19
202 F20 = 0x084, // F20
203 F21 = 0x085, // F21
204 F22 = 0x086, // F22
205 F23 = 0x087, // F23
206 F24 = 0x088, // F24
207
208 SOFT1 = 0x091, // Soft1
209 SOFT2 = 0x092, // Soft2
210 SOFT3 = 0x093, // Soft3
211 SOFT4 = 0x094, // Soft4
212 SOFT5 = 0x095, // Soft5
213 SOFT6 = 0x096, // Soft6
214 SOFT7 = 0x097, // Soft7
215 SOFT8 = 0x098, // Soft8
216 CLOSE = 0x0A0, // Close
217
218 // Multimedia Keys
219 // http://www.w3.org/TR/DOM-Level-3-Events-key/#keys-multimedia
220 MAIL_FORWARD = 0x0A1, // MailForward
221 MAIL_REPLY = 0x0A2, // MailReply
222 MAIL_SEND = 0x0A3, // MailSend
223 MEDIA_PLAY_PAUSE = 0x0A4, // MediaPlayPause
224 MEDIA_SELECT = 0x0A5, // MediaSelect
225 MEDIA_STOP = 0x0A6, // MediaStop
226 MEDIA_TRACK_NEXT = 0x0A7, // MediaTrackNext
227 MEDIA_TRACK_PREVIOUS = 0x0A8, // MediaTrackPrevious
228 NEW = 0x0A9, // New
229 OPEN = 0x0AA, // Open
230 PRINT = 0x0AB, // Print
231 SAVE = 0x0AC, // Save
232 SPELL_CHECK = 0x0AD, // SpellCheck
233 VOLUME_DOWN = 0x0B0, // VolumeDown
234 VOLUME_UP = 0x0B1, // VolumeUp
235 VOLUME_MUTE = 0x0B2, // VolumeMute
236
237 // Application Keys
238 // http://www.w3.org/TR/DOM-Level-3-Events-key/#keys-apps
239 LAUNCH_CALCULATOR = 0x0C0, // LaunchCalculator
240 LAUNCH_CALENDAR = 0x0C1, // LaunchCalendar
241 LAUNCH_MAIL = 0x0C2, // LaunchMail
242 LAUNCH_MEDIA_PLAYER = 0x0C3, // LaunchMediaPlayer
243 LAUNCH_MUSIC_PLAYER = 0x0C4, // LaunchMusicPlayer
244 LAUNCH_MY_COMPUTER = 0x0C5, // LaunchMyComputer
245 LAUNCH_SCREEN_SAVER = 0x0C6, // LaunchScreenSaver
246 LAUNCH_SPREADSHEET = 0x0C7, // LaunchSpreadsheet
247 LAUNCH_WEB_BROWSER = 0x0C8, // LaunchWebBrowser
248 LAUNCH_WEB_CAM = 0x0C9, // LaunchWebCam
249 LAUNCH_WORD_PROCESSOR = 0x0CA, // LaunchWordProcessor
250
251 // Browser Keys
252 // http://www.w3.org/TR/DOM-Level-3-Events-key/#keys-browser
253 BROWSER_BACK = 0x0D0, // BrowserBack
254 BROWSER_FAVORITES = 0x0D1, // BrowserFavorites
255 BROWSER_FORWARD = 0x0D2, // BrowserForward
256 BROWSER_HOME = 0x0D3, // BrowserHome
257 BROWSER_REFRESH = 0x0D4, // BrowserRefresh
258 BROWSER_SEARCH = 0x0D5, // BrowserSearch
259 BROWSER_STOP = 0x0D6, // BrowserStop
260
261 // Media Controller Keys
262 // http://www.w3.org/TR/DOM-Level-3-Events-key/#keys-media-controller
263 AUDIO_BALANCE_LEFT = 0x0D9, // AudioBalanceLeft
264 AUDIO_BALANCE_RIGHT = 0x0DA, // AudioBalanceRight
265 AUDIO_BASS_BOOST_DOWN = 0x0DB, // AudioBassBoostDown
266 AUDIO_BASS_BOOST_UP = 0x0DC, // AudioBassBoostUp
267 AUDIO_FADER_FRONT = 0x0DD, // AudioFaderFront
268 AUDIO_FADER_REAR = 0x0DE, // AudioFaderRear
269 AUDIO_SURROUND_MODE_NEXT = 0x0DF, // AudioSurroundModeNext
270
271 AVR_INPUT = 0x0E0, // AVRInput
272 AVR_POWER = 0x0E1, // AVRPower
273 CHANNEL_DOWN = 0x0E2, // ChannelDown
274 CHANNEL_UP = 0x0E3, // ChannelUp
275 COLOR_F0_RED = 0x0E4, // ColorF0Red
276 COLOR_F1_GREEN = 0x0E5, // ColorF1Green
277 COLOR_F2_YELLOW = 0x0E6, // ColorF2Yellow
278 COLOR_F3_BLUE = 0x0E7, // ColorF3Blue
279 COLOR_F4_GREY = 0x0E8, // ColorF4Grey
280 COLOR_F5_BROWN = 0x0E9, // ColorF5Brown
281 CLOSED_CAPTION_TOGGLE = 0x0EA, // ClosedCaptionToggle
282 DIMMER = 0x0EB, // Dimmer
283 DISPLAY_SWAP = 0x0EC, // DisplaySwap
284 EXIT = 0x0ED, // Exit
285
286 FAVORITE_CLEAR0 = 0x0F0, // FavoriteClear0
287 FAVORITE_CLEAR1 = 0x0F1, // FavoriteClear1
288 FAVORITE_CLEAR2 = 0x0F2, // FavoriteClear2
289 FAVORITE_CLEAR3 = 0x0F3, // FavoriteClear3
290 FAVORITE_RECALL0 = 0x0F4, // FavoriteRecall0
291 FAVORITE_RECALL1 = 0x0F5, // FavoriteRecall1
292 FAVORITE_RECALL2 = 0x0F6, // FavoriteRecall2
293 FAVORITE_RECALL3 = 0x0F7, // FavoriteRecall3
294 FAVORITE_STORE0 = 0x0F8, // FavoriteStore0
295 FAVORITE_STORE1 = 0x0F9, // FavoriteStore1
296 FAVORITE_STORE2 = 0x0FA, // FavoriteStore2
297 FAVORITE_STORE3 = 0x0FB, // FavoriteStore3
298 GUIDE = 0x0FC, // Guide
299 GUIDE_NEXT_DAY = 0x0FD, // GuideNextDay
300 GUIDE_PREVIOUS_DAY = 0x0FE, // GuidePreviousDay
301 INFO = 0x0FF, // Info
302
303 INSTANT_REPLAY = 0x100, // InstantReplay
304 LINK = 0x101, // Link
305 LIST_PROGRAM = 0x102, // ListProgram
306 LIVE_CONTENT = 0x103, // LiveContent
307 LOCK = 0x104, // Lock
308 MEDIA_APPS = 0x108, // MediaApps
309 MEDIA_FAST_FORWARD = 0x109, // MediaFastForward
310 MEDIA_LAST = 0x10A, // MediaLast
311 MEDIA_PAUSE = 0x10B, // MediaPause
312 MEDIA_PLAY = 0x10C, // MediaPlay
313 MEDIA_RECORD = 0x10D, // MediaRecord
314 MEDIA_REWIND = 0x10E, // MediaRewind
315 MEDIA_SKIP = 0x10F, // MediaSkip
316
317 NEXT_FAVORITE_CHANNEL = 0x110, // NextFavoriteChannel
318 NEXT_USER_PROFILE = 0x111, // NextUserProfile
319 ON_DEMAND = 0x112, // OnDemand
320 PIN_P_DOWN = 0x113, // PinPDown
321 PIN_P_MOVE = 0x114, // PinPMove
322 PIN_P_TOGGLE = 0x115, // PinPToggle
323 PIN_P_UP = 0x116, // PinPUp
324 PLAY_SPEED_DOWN = 0x117, // PlaySpeedDown
325 PLAY_SPEED_RESET = 0x118, // PlaySpeedReset
326 PLAY_SPEED_UP = 0x119, // PlaySpeedUp
327 RANDOM_TOGGLE = 0x11A, // RandomToggle
328 RC_LOW_BATTERY = 0x11B, // RcLowBattery
329 RECORD_SPEED_NEXT = 0x11C, // RecordSpeedNext
330 RF_BYPASS = 0x11D, // RfBypass
331 SCAN_CHANNELS_TOGGLE = 0x11E, // ScanChannelsToggle
332 SCREEN_MODE_NEXT = 0x11F, // ScreenModeNext
333
334 SETTINGS = 0x120, // Settings
335 SPLIT_SCREEN_TOGGLE = 0x121, // SplitScreenToggle
336 STB_INPUT = 0x122, // STBInput
337 STB_POWER = 0x123, // STBPower
338 SUBTITLE = 0x124, // Subtitle
339 TELETEXT = 0x125, // Teletext
340 TV = 0x126, // TV
341 TV_INPUT = 0x127, // TVInput
342 TV_POWER = 0x128, // TVPower
343 VIDEO_MODE_NEXT = 0x129, // VideoModeNext
344 WINK = 0x12A, // Wink
345 ZOOM_TOGGLE = 0x12B, // ZoomToggle
346 };
347
348 } // namespace ui
349
350 #endif // UI_EVENTS_KEYCODES_DOM3_DOM_KEY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698