ffmpeg_common: s/PIX_FMT/AV_PIX_FMT/
[chromium-blink-merge.git] / ui / events / keycodes / dom_us_layout_data.h
blobf520dc77728f04507e4cd25bf8fad8b728a3d476
1 // Copyright (c) 2015 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.
5 #ifndef UI_EVENTS_KEYCODES_DOM_US_LAYOUT_DATA_H_
6 #define UI_EVENTS_KEYCODES_DOM_US_LAYOUT_DATA_H_
8 namespace ui {
10 // This table maps a DomCode to a printable character, assuming US layout.
11 // It is used by DomCodeToUsLayoutMeaning(), which provides a fallback
12 // interpretation when there is no other way to map a physical key.
13 const struct PrintableCodeEntry {
14 DomCode dom_code;
15 base::char16 character[2]; // normal, shift
16 } kPrintableCodeMap[] = {
17 {DomCode::KEY_A, {'a', 'A'}},
18 {DomCode::KEY_B, {'b', 'B'}},
19 {DomCode::KEY_C, {'c', 'C'}},
20 {DomCode::KEY_D, {'d', 'D'}},
21 {DomCode::KEY_E, {'e', 'E'}},
22 {DomCode::KEY_F, {'f', 'F'}},
23 {DomCode::KEY_G, {'g', 'G'}},
24 {DomCode::KEY_H, {'h', 'H'}},
25 {DomCode::KEY_I, {'i', 'I'}},
26 {DomCode::KEY_J, {'j', 'J'}},
27 {DomCode::KEY_K, {'k', 'K'}},
28 {DomCode::KEY_L, {'l', 'L'}},
29 {DomCode::KEY_M, {'m', 'M'}},
30 {DomCode::KEY_N, {'n', 'N'}},
31 {DomCode::KEY_O, {'o', 'O'}},
32 {DomCode::KEY_P, {'p', 'P'}},
33 {DomCode::KEY_Q, {'q', 'Q'}},
34 {DomCode::KEY_R, {'r', 'R'}},
35 {DomCode::KEY_S, {'s', 'S'}},
36 {DomCode::KEY_T, {'t', 'T'}},
37 {DomCode::KEY_U, {'u', 'U'}},
38 {DomCode::KEY_V, {'v', 'V'}},
39 {DomCode::KEY_W, {'w', 'W'}},
40 {DomCode::KEY_X, {'x', 'X'}},
41 {DomCode::KEY_Y, {'y', 'Y'}},
42 {DomCode::KEY_Z, {'z', 'Z'}},
43 {DomCode::DIGIT1, {'1', '!'}},
44 {DomCode::DIGIT2, {'2', '@'}},
45 {DomCode::DIGIT3, {'3', '#'}},
46 {DomCode::DIGIT4, {'4', '$'}},
47 {DomCode::DIGIT5, {'5', '%'}},
48 {DomCode::DIGIT6, {'6', '^'}},
49 {DomCode::DIGIT7, {'7', '&'}},
50 {DomCode::DIGIT8, {'8', '*'}},
51 {DomCode::DIGIT9, {'9', '('}},
52 {DomCode::DIGIT0, {'0', ')'}},
53 {DomCode::SPACE, {' ', ' '}},
54 {DomCode::MINUS, {'-', '_'}},
55 {DomCode::EQUAL, {'=', '+'}},
56 {DomCode::BRACKET_LEFT, {'[', '{'}},
57 {DomCode::BRACKET_RIGHT, {']', '}'}},
58 {DomCode::BACKSLASH, {'\\', '|'}},
59 {DomCode::SEMICOLON, {';', ':'}},
60 {DomCode::QUOTE, {'\'', '"'}},
61 {DomCode::BACKQUOTE, {'`', '~'}},
62 {DomCode::COMMA, {',', '<'}},
63 {DomCode::PERIOD, {'.', '>'}},
64 {DomCode::SLASH, {'/', '?'}},
65 {DomCode::INTL_BACKSLASH, {'<', '>'}},
66 {DomCode::INTL_HASH, {'\\', '|'}},
67 {DomCode::INTL_YEN, {0x00A5, '|'}},
68 {DomCode::NUMPAD_DIVIDE, {'/', '/'}},
69 {DomCode::NUMPAD_MULTIPLY, {'*', '*'}},
70 {DomCode::NUMPAD_SUBTRACT, {'-', '-'}},
71 {DomCode::NUMPAD_ADD, {'+', '+'}},
72 {DomCode::NUMPAD1, {'1', '1'}},
73 {DomCode::NUMPAD2, {'2', '2'}},
74 {DomCode::NUMPAD3, {'3', '3'}},
75 {DomCode::NUMPAD4, {'4', '4'}},
76 {DomCode::NUMPAD5, {'5', '5'}},
77 {DomCode::NUMPAD6, {'6', '6'}},
78 {DomCode::NUMPAD7, {'7', '7'}},
79 {DomCode::NUMPAD8, {'8', '8'}},
80 {DomCode::NUMPAD9, {'9', '9'}},
81 {DomCode::NUMPAD0, {'0', '0'}},
82 {DomCode::NUMPAD_DECIMAL, {'.', '.'}},
83 {DomCode::NUMPAD_EQUAL, {'=', '='}},
84 {DomCode::NUMPAD_COMMA, {',', ','}},
85 {DomCode::NUMPAD_PAREN_LEFT, {'(', '('}},
86 {DomCode::NUMPAD_PAREN_RIGHT, {')', ')'}},
87 {DomCode::NUMPAD_SIGN_CHANGE, {0x00B1, 0x00B1}},
90 // This table maps a DomCode to a DomKey, assuming US keyboard layout.
91 // It is used by DomCodeToUsLayoutMeaning(), which provides a fallback
92 // interpretation when there is no other way to map a physical key.
93 const struct NonPrintableCodeEntry {
94 DomCode dom_code;
95 DomKey dom_key;
96 base::char16 character;
97 } kNonPrintableCodeMap[] = {
98 {DomCode::ABORT, DomKey::CANCEL},
99 {DomCode::AGAIN, DomKey::AGAIN},
100 {DomCode::ALT_LEFT, DomKey::ALT},
101 {DomCode::ALT_RIGHT, DomKey::ALT},
102 {DomCode::ARROW_DOWN, DomKey::ARROW_DOWN},
103 {DomCode::ARROW_LEFT, DomKey::ARROW_LEFT},
104 {DomCode::ARROW_RIGHT, DomKey::ARROW_RIGHT},
105 {DomCode::ARROW_UP, DomKey::ARROW_UP},
106 {DomCode::BACKSPACE, DomKey::BACKSPACE, 0x0008},
107 {DomCode::BRIGHTNESS_DOWN, DomKey::BRIGHTNESS_DOWN},
108 {DomCode::BRIGHTNESS_UP, DomKey::BRIGHTNESS_UP},
109 // {DomCode::BRIGHTNESS_AUTO, DomKey::_}
110 // {DomCode::BRIGHTNESS_MAXIMUM, DomKey::_}
111 // {DomCode::BRIGHTNESS_MINIMIUM, DomKey::_}
112 // {DomCode::BRIGHTNESS_TOGGLE, DomKey::_}
113 {DomCode::BROWSER_BACK, DomKey::BROWSER_BACK},
114 {DomCode::BROWSER_FAVORITES, DomKey::BROWSER_FAVORITES},
115 {DomCode::BROWSER_FORWARD, DomKey::BROWSER_FORWARD},
116 {DomCode::BROWSER_HOME, DomKey::BROWSER_HOME},
117 {DomCode::BROWSER_REFRESH, DomKey::BROWSER_REFRESH},
118 {DomCode::BROWSER_SEARCH, DomKey::BROWSER_SEARCH},
119 {DomCode::BROWSER_STOP, DomKey::BROWSER_STOP},
120 {DomCode::CAPS_LOCK, DomKey::CAPS_LOCK},
121 {DomCode::CONTEXT_MENU, DomKey::CONTEXT_MENU},
122 {DomCode::CONTROL_LEFT, DomKey::CONTROL},
123 {DomCode::CONTROL_RIGHT, DomKey::CONTROL},
124 {DomCode::CONVERT, DomKey::CONVERT},
125 {DomCode::COPY, DomKey::COPY},
126 {DomCode::CUT, DomKey::CUT},
127 {DomCode::DEL, DomKey::DEL, 0x007F},
128 {DomCode::EJECT, DomKey::EJECT},
129 {DomCode::END, DomKey::END},
130 {DomCode::ENTER, DomKey::ENTER, 0x000D},
131 {DomCode::ESCAPE, DomKey::ESCAPE, 0x001B},
132 {DomCode::F1, DomKey::F1},
133 {DomCode::F2, DomKey::F2},
134 {DomCode::F3, DomKey::F3},
135 {DomCode::F4, DomKey::F4},
136 {DomCode::F5, DomKey::F5},
137 {DomCode::F6, DomKey::F6},
138 {DomCode::F7, DomKey::F7},
139 {DomCode::F8, DomKey::F8},
140 {DomCode::F9, DomKey::F9},
141 {DomCode::F10, DomKey::F10},
142 {DomCode::F11, DomKey::F11},
143 {DomCode::F12, DomKey::F12},
144 {DomCode::F13, DomKey::F13},
145 {DomCode::F14, DomKey::F14},
146 {DomCode::F15, DomKey::F15},
147 {DomCode::F16, DomKey::F16},
148 {DomCode::F17, DomKey::F17},
149 {DomCode::F18, DomKey::F18},
150 {DomCode::F19, DomKey::F19},
151 {DomCode::F20, DomKey::F20},
152 {DomCode::F21, DomKey::F21},
153 {DomCode::F22, DomKey::F22},
154 {DomCode::F23, DomKey::F23},
155 {DomCode::F24, DomKey::F24},
156 {DomCode::FIND, DomKey::FIND},
157 {DomCode::FN, DomKey::FN},
158 {DomCode::FN_LOCK, DomKey::FN_LOCK},
159 {DomCode::HELP, DomKey::HELP},
160 {DomCode::HOME, DomKey::HOME},
161 {DomCode::HYPER, DomKey::HYPER},
162 {DomCode::INSERT, DomKey::INSERT},
163 // {DomCode::INTL_RO, DomKey::_}
164 {DomCode::KANA_MODE, DomKey::KANA_MODE},
165 {DomCode::LANG1, DomKey::HANGUL_MODE},
166 {DomCode::LANG2, DomKey::HANJA_MODE},
167 {DomCode::LANG3, DomKey::KATAKANA},
168 {DomCode::LANG4, DomKey::HIRAGANA},
169 {DomCode::LANG5, DomKey::ZENKAKU_HANKAKU},
170 {DomCode::LAUNCH_APP1, DomKey::LAUNCH_MY_COMPUTER},
171 {DomCode::LAUNCH_APP2, DomKey::LAUNCH_CALCULATOR},
172 {DomCode::LAUNCH_MAIL, DomKey::LAUNCH_MAIL},
173 {DomCode::LAUNCH_SCREEN_SAVER, DomKey::LAUNCH_SCREEN_SAVER},
174 // {DomCode::LAUNCH_DOCUMENTS, DomKey::_}
175 // {DomCode::LAUNCH_FILE_BROWSER, DomKey::_}
176 // {DomCode::LAUNCH_KEYBOARD_LAYOUT, DomKey::_}
177 {DomCode::LOCK_SCREEN, DomKey::LAUNCH_SCREEN_SAVER},
178 {DomCode::MAIL_FORWARD, DomKey::MAIL_FORWARD},
179 {DomCode::MAIL_REPLY, DomKey::MAIL_REPLY},
180 {DomCode::MAIL_SEND, DomKey::MAIL_SEND},
181 {DomCode::MEDIA_PLAY_PAUSE, DomKey::MEDIA_PLAY_PAUSE},
182 {DomCode::MEDIA_SELECT, DomKey::MEDIA_SELECT},
183 {DomCode::MEDIA_STOP, DomKey::MEDIA_STOP},
184 {DomCode::MEDIA_TRACK_NEXT, DomKey::MEDIA_TRACK_NEXT},
185 {DomCode::MEDIA_TRACK_PREVIOUS, DomKey::MEDIA_TRACK_PREVIOUS},
186 // {DomCode::MENU, DomKey::_}
187 {DomCode::NON_CONVERT, DomKey::NON_CONVERT},
188 {DomCode::NUM_LOCK, DomKey::NUM_LOCK},
189 {DomCode::NUMPAD_BACKSPACE, DomKey::BACKSPACE, 0x0008},
190 {DomCode::NUMPAD_CLEAR, DomKey::CLEAR},
191 {DomCode::NUMPAD_ENTER, DomKey::ENTER, 0x000D},
192 // {DomCode::NUMPAD_CLEAR_ENTRY, DomKey::_}
193 // {DomCode::NUMPAD_MEMORY_ADD, DomKey::_}
194 // {DomCode::NUMPAD_MEMORY_CLEAR, DomKey::_}
195 // {DomCode::NUMPAD_MEMORY_RECALL, DomKey::_}
196 // {DomCode::NUMPAD_MEMORY_STORE, DomKey::_}
197 // {DomCode::NUMPAD_MEMORY_SUBTRACT, DomKey::_}
198 {DomCode::OPEN, DomKey::OPEN},
199 {DomCode::OS_LEFT, DomKey::OS},
200 {DomCode::OS_RIGHT, DomKey::OS},
201 {DomCode::PAGE_DOWN, DomKey::PAGE_DOWN},
202 {DomCode::PAGE_UP, DomKey::PAGE_UP},
203 {DomCode::PASTE, DomKey::PASTE},
204 {DomCode::PAUSE, DomKey::PAUSE},
205 {DomCode::POWER, DomKey::POWER},
206 {DomCode::PRINT_SCREEN, DomKey::PRINT_SCREEN},
207 {DomCode::PROPS, DomKey::PROPS},
208 {DomCode::SCROLL_LOCK, DomKey::SCROLL_LOCK},
209 {DomCode::SELECT, DomKey::SELECT},
210 // {DomCode::SELECT_TASK, DomKey::_}
211 {DomCode::SHIFT_LEFT, DomKey::SHIFT},
212 {DomCode::SHIFT_RIGHT, DomKey::SHIFT},
213 {DomCode::SUPER, DomKey::SUPER},
214 {DomCode::TAB, DomKey::TAB, 0x0009},
215 {DomCode::UNDO, DomKey::UNDO},
216 // {DomCode::VOICE_COMMAND, DomKey::_}
217 {DomCode::VOLUME_DOWN, DomKey::VOLUME_DOWN},
218 {DomCode::VOLUME_MUTE, DomKey::VOLUME_MUTE},
219 {DomCode::VOLUME_UP, DomKey::VOLUME_UP},
220 {DomCode::WAKE_UP, DomKey::WAKE_UP},
221 {DomCode::ZOOM_TOGGLE, DomKey::ZOOM_TOGGLE},
224 // This table maps a DomKey to a non-located KeyboardCode.
225 const struct DomKeyToKeyboardCodeEntry {
226 DomKey dom_key;
227 KeyboardCode key_code;
228 } kDomKeyToKeyboardCodeMap[] = {
229 // No value.
230 {DomKey::NONE, VKEY_UNKNOWN},
231 // Special Key Values
232 // http://www.w3.org/TR/DOM-Level-3-Events-key/#keys-special
233 {DomKey::UNIDENTIFIED, VKEY_UNKNOWN},
234 // Modifier Keys
235 // http://www.w3.org/TR/DOM-Level-3-Events-key/#keys-modifier
236 {DomKey::ALT, VKEY_MENU},
237 {DomKey::ALT_GRAPH, VKEY_ALTGR},
238 {DomKey::CAPS_LOCK, VKEY_CAPITAL},
239 {DomKey::CONTROL, VKEY_CONTROL},
240 {DomKey::NUM_LOCK, VKEY_NUMLOCK},
241 {DomKey::OS, VKEY_LWIN},
242 {DomKey::SCROLL_LOCK, VKEY_SCROLL},
243 {DomKey::SHIFT, VKEY_SHIFT},
244 // Whitespace Keys
245 // http://www.w3.org/TR/DOM-Level-3-Events-key/#keys-whitespace
246 {DomKey::ENTER, VKEY_RETURN},
247 {DomKey::SEPARATOR, VKEY_SEPARATOR},
248 {DomKey::TAB, VKEY_TAB},
249 // Navigation Keys
250 // http://www.w3.org/TR/DOM-Level-3-Events-key/#keys-navigation
251 {DomKey::ARROW_DOWN, VKEY_DOWN},
252 {DomKey::ARROW_LEFT, VKEY_LEFT},
253 {DomKey::ARROW_RIGHT, VKEY_RIGHT},
254 {DomKey::ARROW_UP, VKEY_UP},
255 {DomKey::END, VKEY_END},
256 {DomKey::HOME, VKEY_HOME},
257 {DomKey::PAGE_DOWN, VKEY_NEXT},
258 {DomKey::PAGE_UP, VKEY_PRIOR},
259 // Editing Keys
260 // http://www.w3.org/TR/DOM-Level-3-Events-key/#keys-editing
261 {DomKey::BACKSPACE, VKEY_BACK},
262 {DomKey::CLEAR, VKEY_CLEAR},
263 {DomKey::CR_SEL, VKEY_CRSEL},
264 {DomKey::DEL, VKEY_DELETE},
265 {DomKey::ERASE_EOF, VKEY_EREOF},
266 {DomKey::EX_SEL, VKEY_EXSEL},
267 {DomKey::INSERT, VKEY_INSERT},
268 // UI Keys
269 // http://www.w3.org/TR/DOM-Level-3-Events-key/#keys-ui
270 {DomKey::ACCEPT, VKEY_ACCEPT},
271 {DomKey::ATTN, VKEY_ATTN},
272 {DomKey::CONTEXT_MENU, VKEY_APPS},
273 {DomKey::ESCAPE, VKEY_ESCAPE},
274 {DomKey::EXECUTE, VKEY_EXECUTE},
275 {DomKey::HELP, VKEY_HELP},
276 {DomKey::PAUSE, VKEY_PAUSE},
277 {DomKey::PLAY, VKEY_PLAY},
278 {DomKey::SELECT, VKEY_SELECT},
279 // Device Keys
280 // http://www.w3.org/TR/DOM-Level-3-Events-key/#keys-device
281 #if defined(OS_POSIX)
282 {DomKey::BRIGHTNESS_DOWN, VKEY_BRIGHTNESS_DOWN},
283 {DomKey::BRIGHTNESS_UP, VKEY_BRIGHTNESS_UP},
284 {DomKey::POWER, VKEY_POWER},
285 #endif
286 {DomKey::PRINT_SCREEN, VKEY_SNAPSHOT},
287 // IME and Composition Keys
288 // http://www.w3.org/TR/DOM-Level-3-Events-key/#keys-composition
289 #if defined(OS_POSIX)
290 {DomKey::COMPOSE, VKEY_COMPOSE},
291 #endif
292 {DomKey::CONVERT, VKEY_CONVERT},
293 {DomKey::FINAL_MODE, VKEY_FINAL},
294 {DomKey::MODE_CHANGE, VKEY_MODECHANGE},
295 {DomKey::NON_CONVERT, VKEY_NONCONVERT},
296 {DomKey::PROCESS, VKEY_PROCESSKEY},
297 // Keys specific to Korean keyboards
298 {DomKey::HANGUL_MODE, VKEY_HANGUL},
299 {DomKey::HANJA_MODE, VKEY_HANJA},
300 {DomKey::JUNJA_MODE, VKEY_JUNJA},
301 // Keys specific to Japanese keyboards
302 {DomKey::HANKAKU, VKEY_DBE_SBCSCHAR},
303 {DomKey::KANA_MODE, VKEY_KANA},
304 {DomKey::KANJI_MODE, VKEY_KANJI},
305 {DomKey::ZENKAKU, VKEY_DBE_DBCSCHAR},
306 {DomKey::ZENKAKU_HANKAKU, VKEY_DBE_DBCSCHAR},
307 // General-Purpose Function Keys
308 // http://www.w3.org/TR/DOM-Level-3-Events-key/#keys-function
309 {DomKey::F1, VKEY_F1},
310 {DomKey::F2, VKEY_F2},
311 {DomKey::F3, VKEY_F3},
312 {DomKey::F4, VKEY_F4},
313 {DomKey::F5, VKEY_F5},
314 {DomKey::F6, VKEY_F6},
315 {DomKey::F7, VKEY_F7},
316 {DomKey::F8, VKEY_F8},
317 {DomKey::F9, VKEY_F9},
318 {DomKey::F10, VKEY_F10},
319 {DomKey::F11, VKEY_F11},
320 {DomKey::F12, VKEY_F12},
321 {DomKey::F13, VKEY_F13},
322 {DomKey::F14, VKEY_F14},
323 {DomKey::F15, VKEY_F15},
324 {DomKey::F16, VKEY_F16},
325 {DomKey::F17, VKEY_F17},
326 {DomKey::F18, VKEY_F18},
327 {DomKey::F19, VKEY_F19},
328 {DomKey::F20, VKEY_F20},
329 {DomKey::F21, VKEY_F21},
330 {DomKey::F22, VKEY_F22},
331 {DomKey::F23, VKEY_F23},
332 {DomKey::F24, VKEY_F24},
333 // Multimedia Keys
334 // http://www.w3.org/TR/DOM-Level-3-Events-key/#keys-multimedia
335 {DomKey::MEDIA_PLAY_PAUSE, VKEY_MEDIA_PLAY_PAUSE},
336 {DomKey::MEDIA_SELECT, VKEY_MEDIA_LAUNCH_MEDIA_SELECT},
337 {DomKey::MEDIA_STOP, VKEY_MEDIA_STOP},
338 {DomKey::MEDIA_TRACK_NEXT, VKEY_MEDIA_NEXT_TRACK},
339 {DomKey::MEDIA_TRACK_PREVIOUS, VKEY_MEDIA_PREV_TRACK},
340 {DomKey::PRINT, VKEY_PRINT},
341 {DomKey::VOLUME_DOWN, VKEY_VOLUME_DOWN},
342 {DomKey::VOLUME_MUTE, VKEY_VOLUME_MUTE},
343 {DomKey::VOLUME_UP, VKEY_VOLUME_UP},
344 // Application Keys
345 // http://www.w3.org/TR/DOM-Level-3-Events-key/#keys-apps
346 {DomKey::LAUNCH_CALCULATOR, VKEY_MEDIA_LAUNCH_APP2},
347 {DomKey::LAUNCH_MAIL, VKEY_MEDIA_LAUNCH_MAIL},
348 {DomKey::LAUNCH_MY_COMPUTER, VKEY_MEDIA_LAUNCH_APP1},
349 // Browser Keys
350 // http://www.w3.org/TR/DOM-Level-3-Events-key/#keys-browser
351 {DomKey::BROWSER_BACK, VKEY_BROWSER_BACK},
352 {DomKey::BROWSER_FAVORITES, VKEY_BROWSER_FAVORITES},
353 {DomKey::BROWSER_FORWARD, VKEY_BROWSER_FORWARD},
354 {DomKey::BROWSER_HOME, VKEY_BROWSER_HOME},
355 {DomKey::BROWSER_REFRESH, VKEY_BROWSER_REFRESH},
356 {DomKey::BROWSER_SEARCH, VKEY_BROWSER_SEARCH},
357 {DomKey::BROWSER_STOP, VKEY_BROWSER_STOP},
358 // Media Controller Keys
359 // http://www.w3.org/TR/DOM-Level-3-Events-key/#keys-media-controller
360 #if defined(OS_POSIX)
361 {DomKey::MEDIA_FAST_FORWARD, VKEY_OEM_104},
362 #endif
363 {DomKey::MEDIA_PLAY, VKEY_PLAY},
364 #if defined(OS_POSIX)
365 {DomKey::MEDIA_REWIND, VKEY_OEM_103},
366 #endif
367 {DomKey::ZOOM_TOGGLE, VKEY_ZOOM},
370 // This table, used by DomCodeToUsLayoutKeyboardCode() and
371 // UsLayoutKeyboardCodeToDomCode(), maps between DOM Level 3 .code values
372 // and legacy Windows-based VKEY values, where the VKEYs are interpreted
373 // positionally (located) following a base US English layout.
374 const struct DomCodeToKeyboardCodeEntry {
375 DomCode dom_code;
376 KeyboardCode key_code;
377 } kDomCodeToKeyboardCodeMap[] = {
378 // Entries are ordered by numeric value of the DomCode enum,
379 // which is the USB physical key code.
380 // DomCode::HYPER 0x000010 Hyper
381 // DomCode::SUPER 0x000011 Super
382 // DomCode::FN 0x000012 Fn
383 // DomCode::FN_LOCK 0x000013 FLock
384 // DomCode::SUSPEND 0x000014 Suspend
385 // DomCode::RESUME 0x000015 Resume
386 // DomCode::TURBO 0x000016 Turbo
387 {DomCode::SLEEP, VKEY_SLEEP}, // 0x010082 Sleep
388 // DomCode::WAKE_UP 0x010083 WakeUp
389 {DomCode::KEY_A, VKEY_A}, // 0x070004 KeyA
390 {DomCode::KEY_B, VKEY_B}, // 0x070005 KeyB
391 {DomCode::KEY_C, VKEY_C}, // 0x070006 KeyC
392 {DomCode::KEY_D, VKEY_D}, // 0x070007 KeyD
393 {DomCode::KEY_E, VKEY_E}, // 0x070008 KeyE
394 {DomCode::KEY_F, VKEY_F}, // 0x070009 KeyF
395 {DomCode::KEY_G, VKEY_G}, // 0x07000A KeyG
396 {DomCode::KEY_H, VKEY_H}, // 0x07000B KeyH
397 {DomCode::KEY_I, VKEY_I}, // 0x07000C KeyI
398 {DomCode::KEY_J, VKEY_J}, // 0x07000D KeyJ
399 {DomCode::KEY_K, VKEY_K}, // 0x07000E KeyK
400 {DomCode::KEY_L, VKEY_L}, // 0x07000F KeyL
401 {DomCode::KEY_M, VKEY_M}, // 0x070010 KeyM
402 {DomCode::KEY_N, VKEY_N}, // 0x070011 KeyN
403 {DomCode::KEY_O, VKEY_O}, // 0x070012 KeyO
404 {DomCode::KEY_P, VKEY_P}, // 0x070013 KeyP
405 {DomCode::KEY_Q, VKEY_Q}, // 0x070014 KeyQ
406 {DomCode::KEY_R, VKEY_R}, // 0x070015 KeyR
407 {DomCode::KEY_S, VKEY_S}, // 0x070016 KeyS
408 {DomCode::KEY_T, VKEY_T}, // 0x070017 KeyT
409 {DomCode::KEY_U, VKEY_U}, // 0x070018 KeyU
410 {DomCode::KEY_V, VKEY_V}, // 0x070019 KeyV
411 {DomCode::KEY_W, VKEY_W}, // 0x07001A KeyW
412 {DomCode::KEY_X, VKEY_X}, // 0x07001B KeyX
413 {DomCode::KEY_Y, VKEY_Y}, // 0x07001C KeyY
414 {DomCode::KEY_Z, VKEY_Z}, // 0x07001D KeyZ
415 {DomCode::DIGIT1, VKEY_1}, // 0x07001E Digit1
416 {DomCode::DIGIT2, VKEY_2}, // 0x07001F Digit2
417 {DomCode::DIGIT3, VKEY_3}, // 0x070020 Digit3
418 {DomCode::DIGIT4, VKEY_4}, // 0x070021 Digit4
419 {DomCode::DIGIT5, VKEY_5}, // 0x070022 Digit5
420 {DomCode::DIGIT6, VKEY_6}, // 0x070023 Digit6
421 {DomCode::DIGIT7, VKEY_7}, // 0x070024 Digit7
422 {DomCode::DIGIT8, VKEY_8}, // 0x070025 Digit8
423 {DomCode::DIGIT9, VKEY_9}, // 0x070026 Digit9
424 {DomCode::DIGIT0, VKEY_0}, // 0x070027 Digit0
425 {DomCode::ENTER, VKEY_RETURN}, // 0x070028 Enter
426 {DomCode::ESCAPE, VKEY_ESCAPE}, // 0x070029 Escape
427 {DomCode::BACKSPACE, VKEY_BACK}, // 0x07002A Backspace
428 {DomCode::TAB, VKEY_TAB}, // 0x07002B Tab
429 {DomCode::SPACE, VKEY_SPACE}, // 0x07002C Space
430 {DomCode::MINUS, VKEY_OEM_MINUS}, // 0x07002D Minus
431 {DomCode::EQUAL, VKEY_OEM_PLUS}, // 0x07002E Equal
432 {DomCode::BRACKET_LEFT, VKEY_OEM_4}, // 0x07002F BracketLeft
433 {DomCode::BRACKET_RIGHT, VKEY_OEM_6}, // 0x070030 BracketRight
434 {DomCode::BACKSLASH, VKEY_OEM_5}, // 0x070031 Backslash
435 {DomCode::INTL_HASH, VKEY_OEM_5}, // 0x070032 IntlHash
436 {DomCode::SEMICOLON, VKEY_OEM_1}, // 0x070033 Semicolon
437 {DomCode::QUOTE, VKEY_OEM_7}, // 0x070034 Quote
438 {DomCode::BACKQUOTE, VKEY_OEM_3}, // 0x070035 Backquote
439 {DomCode::COMMA, VKEY_OEM_COMMA}, // 0x070036 Comma
440 {DomCode::PERIOD, VKEY_OEM_PERIOD}, // 0x070037 Period
441 {DomCode::SLASH, VKEY_OEM_2}, // 0x070038 Slash
442 {DomCode::CAPS_LOCK, VKEY_CAPITAL}, // 0x070039 CapsLock
443 {DomCode::F1, VKEY_F1}, // 0x07003A F1
444 {DomCode::F2, VKEY_F2}, // 0x07003B F2
445 {DomCode::F3, VKEY_F3}, // 0x07003C F3
446 {DomCode::F4, VKEY_F4}, // 0x07003D F4
447 {DomCode::F5, VKEY_F5}, // 0x07003E F5
448 {DomCode::F6, VKEY_F6}, // 0x07003F F6
449 {DomCode::F7, VKEY_F7}, // 0x070040 F7
450 {DomCode::F8, VKEY_F8}, // 0x070041 F8
451 {DomCode::F9, VKEY_F9}, // 0x070042 F9
452 {DomCode::F10, VKEY_F10}, // 0x070043 F10
453 {DomCode::F11, VKEY_F11}, // 0x070044 F11
454 {DomCode::F12, VKEY_F12}, // 0x070045 F12
455 {DomCode::PRINT_SCREEN, VKEY_SNAPSHOT}, // 0x070046 PrintScreen
456 {DomCode::SCROLL_LOCK, VKEY_SCROLL}, // 0x070047 ScrollLock
457 {DomCode::PAUSE, VKEY_PAUSE}, // 0x070048 Pause
458 {DomCode::INSERT, VKEY_INSERT}, // 0x070049 Insert
459 {DomCode::HOME, VKEY_HOME}, // 0x07004A Home
460 {DomCode::PAGE_UP, VKEY_PRIOR}, // 0x07004B PageUp
461 {DomCode::DEL, VKEY_DELETE}, // 0x07004C Delete
462 {DomCode::END, VKEY_END}, // 0x07004D End
463 {DomCode::PAGE_DOWN, VKEY_NEXT}, // 0x07004E PageDown
464 {DomCode::ARROW_RIGHT, VKEY_RIGHT}, // 0x07004F ArrowRight
465 {DomCode::ARROW_LEFT, VKEY_LEFT}, // 0x070050 ArrowLeft
466 {DomCode::ARROW_DOWN, VKEY_DOWN}, // 0x070051 ArrowDown
467 {DomCode::ARROW_UP, VKEY_UP}, // 0x070052 ArrowUp
468 {DomCode::NUM_LOCK, VKEY_NUMLOCK}, // 0x070053 NumLock
469 {DomCode::NUMPAD_DIVIDE, VKEY_DIVIDE}, // 0x070054 NumpadDivide
470 {DomCode::NUMPAD_MULTIPLY, VKEY_MULTIPLY}, // 0x070055 NumpadMultiply
471 {DomCode::NUMPAD_SUBTRACT, VKEY_SUBTRACT}, // 0x070056 NumpadSubtract
472 {DomCode::NUMPAD_ADD, VKEY_ADD}, // 0x070057 NumpadAdd
473 {DomCode::NUMPAD_ENTER, VKEY_RETURN}, // 0x070058 NumpadEnter
474 {DomCode::NUMPAD1, VKEY_NUMPAD1}, // 0x070059 Numpad1
475 {DomCode::NUMPAD2, VKEY_NUMPAD2}, // 0x07005A Numpad2
476 {DomCode::NUMPAD3, VKEY_NUMPAD3}, // 0x07005B Numpad3
477 {DomCode::NUMPAD4, VKEY_NUMPAD4}, // 0x07005C Numpad4
478 {DomCode::NUMPAD5, VKEY_NUMPAD5}, // 0x07005D Numpad5
479 {DomCode::NUMPAD6, VKEY_NUMPAD6}, // 0x07005E Numpad6
480 {DomCode::NUMPAD7, VKEY_NUMPAD7}, // 0x07005F Numpad7
481 {DomCode::NUMPAD8, VKEY_NUMPAD8}, // 0x070060 Numpad8
482 {DomCode::NUMPAD9, VKEY_NUMPAD9}, // 0x070061 Numpad9
483 {DomCode::NUMPAD0, VKEY_NUMPAD0}, // 0x070062 Numpad0
484 {DomCode::NUMPAD_DECIMAL, VKEY_DECIMAL}, // 0x070063 NumpadDecimal
485 {DomCode::INTL_BACKSLASH, VKEY_OEM_102}, // 0x070064 IntlBackslash
486 {DomCode::CONTEXT_MENU, VKEY_APPS}, // 0x070065 ContextMenu
487 #if defined(OS_POSIX)
488 {DomCode::POWER, VKEY_POWER}, // 0x070066 Power
489 #endif
490 // DomCode::NUMPAD_EQUAL 0x070067 NumpadEqual
491 {DomCode::F13, VKEY_F13}, // 0x070068 F13
492 {DomCode::F14, VKEY_F14}, // 0x070069 F14
493 {DomCode::F15, VKEY_F15}, // 0x07006A F15
494 {DomCode::F16, VKEY_F16}, // 0x07006B F16
495 {DomCode::F17, VKEY_F17}, // 0x07006C F17
496 {DomCode::F18, VKEY_F18}, // 0x07006D F18
497 {DomCode::F19, VKEY_F19}, // 0x07006E F19
498 {DomCode::F20, VKEY_F20}, // 0x07006F F20
499 {DomCode::F21, VKEY_F21}, // 0x070070 F21
500 {DomCode::F22, VKEY_F22}, // 0x070071 F22
501 {DomCode::F23, VKEY_F23}, // 0x070072 F23
502 {DomCode::F24, VKEY_F24}, // 0x070073 F24
503 {DomCode::OPEN, VKEY_EXECUTE}, // 0x070074 Open
504 {DomCode::HELP, VKEY_HELP}, // 0x070075 Help
505 {DomCode::SELECT, VKEY_SELECT}, // 0x070077 Select
506 // DomCode::AGAIN 0x070079 Again
507 // DomCode::UNDO 0x07007A Undo
508 // DomCode::CUT 0x07007B Cut
509 // DomCode::COPY 0x07007C Copy
510 // DomCode::PASTE 0x07007D Paste
511 // DomCode::FIND 0x07007E Find
512 {DomCode::VOLUME_MUTE, VKEY_VOLUME_MUTE}, // 0x07007F VolumeMute
513 {DomCode::VOLUME_UP, VKEY_VOLUME_UP}, // 0x070080 VolumeUp
514 {DomCode::VOLUME_DOWN, VKEY_VOLUME_DOWN}, // 0x070081 VolumeDown
515 {DomCode::NUMPAD_COMMA, VKEY_OEM_COMMA}, // 0x070085 NumpadComma
516 {DomCode::INTL_RO, VKEY_OEM_102}, // 0x070087 IntlRo
517 {DomCode::KANA_MODE, VKEY_KANA}, // 0x070088 KanaMode
518 {DomCode::INTL_YEN, VKEY_OEM_5}, // 0x070089 IntlYen
519 {DomCode::CONVERT, VKEY_CONVERT}, // 0x07008A Convert
520 {DomCode::NON_CONVERT, VKEY_NONCONVERT}, // 0x07008B NonConvert
521 {DomCode::LANG1, VKEY_KANA}, // 0x070090 Lang1
522 {DomCode::LANG2, VKEY_KANJI}, // 0x070091 Lang2
523 // DomCode::LANG3 0x070092 Lang3
524 // DomCode::LANG4 0x070093 Lang4
525 // DomCode::LANG5 0x070094 Lang5
526 // DomCode::ABORT 0x07009B Abort
527 // DomCode::PROPS 0x0700A3 Props
528 // DomCode::NUMPAD_PAREN_LEFT 0x0700B6 NumpadParenLeft
529 // DomCode::NUMPAD_PAREN_RIGHT 0x0700B7 NumpadParenRight
530 {DomCode::NUMPAD_BACKSPACE, VKEY_BACK}, // 0x0700BB NumpadBackspace
531 // DomCode::NUMPAD_MEMORY_STORE 0x0700D0 NumpadMemoryStore
532 // DomCode::NUMPAD_MEMORY_RECALL 0x0700D1 NumpadMemoryRecall
533 // DomCode::NUMPAD_MEMORY_CLEAR 0x0700D2 NumpadMemoryClear
534 // DomCode::NUMPAD_MEMORY_ADD 0x0700D3 NumpadMemoryAdd
535 // DomCode::NUMPAD_MEMORY_SUBTRACT 0x0700D4 NumpadMemorySubtract
536 {DomCode::NUMPAD_CLEAR, VKEY_CLEAR}, // 0x0700D8 NumpadClear
537 {DomCode::NUMPAD_CLEAR_ENTRY, VKEY_CLEAR}, // 0x0700D9 NumpadClearEntry
538 {DomCode::CONTROL_LEFT, VKEY_LCONTROL}, // 0x0700E0 ControlLeft
539 {DomCode::SHIFT_LEFT, VKEY_LSHIFT}, // 0x0700E1 ShiftLeft
540 {DomCode::ALT_LEFT, VKEY_LMENU}, // 0x0700E2 AltLeft
541 {DomCode::OS_LEFT, VKEY_LWIN}, // 0x0700E3 OSLeft
542 {DomCode::CONTROL_RIGHT, VKEY_RCONTROL}, // 0x0700E4 ControlRight
543 {DomCode::SHIFT_RIGHT, VKEY_RSHIFT}, // 0x0700E5 ShiftRight
544 {DomCode::ALT_RIGHT, VKEY_RMENU}, // 0x0700E6 AltRight
545 {DomCode::OS_RIGHT, VKEY_RWIN}, // 0x0700E7 OSRight
546 #if defined(OS_POSIX)
547 {DomCode::BRIGHTNESS_UP,
548 VKEY_BRIGHTNESS_UP}, // 0x0C006F BrightnessUp
549 {DomCode::BRIGHTNESS_DOWN,
550 VKEY_BRIGHTNESS_DOWN}, // 0x0C0070 BrightnessDown
551 #endif
552 {DomCode::MEDIA_TRACK_NEXT,
553 VKEY_MEDIA_NEXT_TRACK}, // 0x0C00B5 MediaTrackNext
554 {DomCode::MEDIA_TRACK_PREVIOUS,
555 VKEY_MEDIA_PREV_TRACK}, // 0x0C00B6 MediaTrackPrevious
556 {DomCode::MEDIA_STOP, VKEY_MEDIA_STOP}, // 0x0C00B7 MediaStop
557 // DomCode::EJECT 0x0C00B8 Eject
558 {DomCode::MEDIA_PLAY_PAUSE,
559 VKEY_MEDIA_PLAY_PAUSE}, // 0x0C00CD MediaPlayPause
560 {DomCode::MEDIA_SELECT,
561 VKEY_MEDIA_LAUNCH_MEDIA_SELECT}, // 0x0C0183 MediaSelect
562 {DomCode::LAUNCH_MAIL,
563 VKEY_MEDIA_LAUNCH_MAIL}, // 0x0C018A LaunchMail
564 {DomCode::LAUNCH_APP2,
565 VKEY_MEDIA_LAUNCH_APP2}, // 0x0C0192 LaunchApp2
566 {DomCode::LAUNCH_APP1,
567 VKEY_MEDIA_LAUNCH_APP1}, // 0x0C0194 LaunchApp1
568 {DomCode::BROWSER_SEARCH,
569 VKEY_BROWSER_SEARCH}, // 0x0C0221 BrowserSearch
570 {DomCode::BROWSER_HOME, VKEY_BROWSER_HOME}, // 0x0C0223 BrowserHome
571 {DomCode::BROWSER_BACK, VKEY_BROWSER_BACK}, // 0x0C0224 BrowserBack
572 {DomCode::BROWSER_FORWARD,
573 VKEY_BROWSER_FORWARD}, // 0x0C0225 BrowserForward
574 {DomCode::BROWSER_STOP, VKEY_BROWSER_STOP}, // 0x0C0226 BrowserStop
575 {DomCode::BROWSER_REFRESH,
576 VKEY_BROWSER_REFRESH}, // 0x0C0227 BrowserRefresh
577 {DomCode::BROWSER_FAVORITES,
578 VKEY_BROWSER_FAVORITES}, // 0x0C022A BrowserFavorites
579 {DomCode::ZOOM_TOGGLE, VKEY_ZOOM}, // 0x0C0232 ZoomToggle
582 // This table, used by UsLayoutKeyboardCodeToDomCode(), maps legacy
583 // Windows-based VKEY values that are not part of kDomCodeToKeyboardCodeMap[]
584 // to suitable DomCode values, where practical.
585 const DomCodeToKeyboardCodeEntry kFallbackKeyboardCodeToDomCodeMap[] = {
586 {DomCode::ALT_LEFT, VKEY_MENU},
587 {DomCode::ALT_RIGHT, VKEY_ALTGR},
588 #if defined(OS_POSIX)
589 {DomCode::CONTEXT_MENU, VKEY_COMPOSE},
590 #endif
591 {DomCode::CONTROL_LEFT, VKEY_CONTROL},
592 {DomCode::LANG1, VKEY_HANGUL},
593 {DomCode::LANG2, VKEY_HANJA},
594 {DomCode::LANG5, VKEY_DBE_DBCSCHAR},
595 {DomCode::NUMPAD_CLEAR, VKEY_OEM_CLEAR},
596 {DomCode::NUMPAD_DECIMAL, VKEY_SEPARATOR},
597 {DomCode::PROPS, VKEY_CRSEL},
598 {DomCode::SHIFT_LEFT, VKEY_SHIFT},
599 {DomCode::SUPER, VKEY_OEM_8},
601 // VKEYs with no directly corresponding DomCode, but a USB usage code:
602 // VKEY_ATTN // 0x07009A SysReq
603 // VKEY_SEPARATOR // 0x07009F Separator
604 // VKEY_EXSEL // 0x0700A4 ExSel
605 // VKEY_PRINT // 0x0C0208 AC Print
606 // VKEY_PLAY // 0x0C00B0 MediaPlay
607 // VKEY_OEM_103 // 0x0C00B4 MediaRewind
608 // VKEY_OEM_104 // 0x0C00B3 MediaFastForward
610 // VKEYs with no corresponding DomCode, but a Linux evdev usage code:
611 // VKEY_KBD_BRIGHTNESS_DOWN // evdev KEY_KBDILLUMDOWN
612 // VKEY_KBD_BRIGHTNESS_UP // evdev KEY_KBDILLUMUP
613 // VKEY_WLAN // evdev KEY_WLAN
615 // VKEYs with no corresponding DomCode and no obvious USB usage code:
616 // VKEY_ACCEPT
617 // VKEY_BACKTAB
618 // VKEY_DBE_SBCSCHAR
619 // VKEY_EREOF
620 // VKEY_FINAL
621 // VKEY_JUNJA
622 // VKEY_MODECHANGE
623 // VKEY_NONAME
624 // VKEY_PA1
625 // VKEY_PACKET
626 // VKEY_PROCESSKEY
629 } // namespace ui
631 #endif // UI_EVENTS_KEYCODES_DOM_US_LAYOUT_DATA_H_