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

Side by Side Diff: ui/events/keycodes/dom_us_layout_data.h

Issue 1085733007: Revert of Take GetCharacterFromKeyCode() out behind the barn. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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 unified diff | Download patch
« no previous file with comments | « ui/base/accelerators/accelerator.cc ('k') | ui/events/keycodes/keyboard_code_conversion.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_EVENTS_KEYCODES_DOM_US_LAYOUT_DATA_H_ 5 #ifndef UI_EVENTS_KEYCODES_DOM_US_LAYOUT_DATA_H_
6 #define UI_EVENTS_KEYCODES_DOM_US_LAYOUT_DATA_H_ 6 #define UI_EVENTS_KEYCODES_DOM_US_LAYOUT_DATA_H_
7 7
8 namespace ui { 8 namespace ui {
9 9
10 // This table maps a DomCode to a printable character, assuming US layout. 10 // This table maps a DomCode to a printable character, assuming US layout.
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 {DomCode::EQUAL, {'=', '+'}}, 53 {DomCode::EQUAL, {'=', '+'}},
54 {DomCode::BRACKET_LEFT, {'[', '{'}}, 54 {DomCode::BRACKET_LEFT, {'[', '{'}},
55 {DomCode::BRACKET_RIGHT, {']', '}'}}, 55 {DomCode::BRACKET_RIGHT, {']', '}'}},
56 {DomCode::BACKSLASH, {'\\', '|'}}, 56 {DomCode::BACKSLASH, {'\\', '|'}},
57 {DomCode::SEMICOLON, {';', ':'}}, 57 {DomCode::SEMICOLON, {';', ':'}},
58 {DomCode::QUOTE, {'\'', '"'}}, 58 {DomCode::QUOTE, {'\'', '"'}},
59 {DomCode::BACKQUOTE, {'`', '~'}}, 59 {DomCode::BACKQUOTE, {'`', '~'}},
60 {DomCode::COMMA, {',', '<'}}, 60 {DomCode::COMMA, {',', '<'}},
61 {DomCode::PERIOD, {'.', '>'}}, 61 {DomCode::PERIOD, {'.', '>'}},
62 {DomCode::SLASH, {'/', '?'}}, 62 {DomCode::SLASH, {'/', '?'}},
63 {DomCode::INTL_BACKSLASH, {'<', '>'}}, 63 {DomCode::INTL_BACKSLASH, {'\\', '|'}},
64 {DomCode::INTL_YEN, {0x00A5, '|'}}, 64 {DomCode::INTL_YEN, {0x00A5, '|'}},
65 {DomCode::NUMPAD_DIVIDE, {'/', '/'}}, 65 {DomCode::NUMPAD_DIVIDE, {'/', '/'}},
66 {DomCode::NUMPAD_MULTIPLY, {'*', '*'}}, 66 {DomCode::NUMPAD_MULTIPLY, {'*', '*'}},
67 {DomCode::NUMPAD_SUBTRACT, {'-', '-'}}, 67 {DomCode::NUMPAD_SUBTRACT, {'-', '-'}},
68 {DomCode::NUMPAD_ADD, {'+', '+'}}, 68 {DomCode::NUMPAD_ADD, {'+', '+'}},
69 {DomCode::NUMPAD1, {'1', '1'}}, 69 {DomCode::NUMPAD1, {'1', '1'}},
70 {DomCode::NUMPAD2, {'2', '2'}}, 70 {DomCode::NUMPAD2, {'2', '2'}},
71 {DomCode::NUMPAD3, {'3', '3'}}, 71 {DomCode::NUMPAD3, {'3', '3'}},
72 {DomCode::NUMPAD4, {'4', '4'}}, 72 {DomCode::NUMPAD4, {'4', '4'}},
73 {DomCode::NUMPAD5, {'5', '5'}}, 73 {DomCode::NUMPAD5, {'5', '5'}},
(...skipping 499 matching lines...) Expand 10 before | Expand all | Expand 10 after
573 VKEY_BROWSER_FAVORITES}, // 0x0C022A BrowserFavorites 573 VKEY_BROWSER_FAVORITES}, // 0x0C022A BrowserFavorites
574 {DomCode::ZOOM_TOGGLE, VKEY_ZOOM}, // 0x0C0232 ZoomToggle 574 {DomCode::ZOOM_TOGGLE, VKEY_ZOOM}, // 0x0C0232 ZoomToggle
575 }; 575 };
576 576
577 // This table, used by UsLayoutKeyboardCodeToDomCode(), maps legacy 577 // This table, used by UsLayoutKeyboardCodeToDomCode(), maps legacy
578 // Windows-based VKEY values that are not part of kDomCodeToKeyboardCodeMap[] 578 // Windows-based VKEY values that are not part of kDomCodeToKeyboardCodeMap[]
579 // to suitable DomCode values, where practical. 579 // to suitable DomCode values, where practical.
580 const DomCodeToKeyboardCodeEntry kFallbackKeyboardCodeToDomCodeMap[] = { 580 const DomCodeToKeyboardCodeEntry kFallbackKeyboardCodeToDomCodeMap[] = {
581 {DomCode::ALT_LEFT, VKEY_MENU}, 581 {DomCode::ALT_LEFT, VKEY_MENU},
582 {DomCode::ALT_RIGHT, VKEY_ALTGR}, 582 {DomCode::ALT_RIGHT, VKEY_ALTGR},
583 {DomCode::BACKQUOTE, VKEY_DBE_SBCSCHAR},
583 #if defined(OS_POSIX) 584 #if defined(OS_POSIX)
584 {DomCode::CONTEXT_MENU, VKEY_COMPOSE}, 585 {DomCode::CONTEXT_MENU, VKEY_COMPOSE},
585 #endif 586 #endif
586 {DomCode::CONTROL_LEFT, VKEY_CONTROL}, 587 {DomCode::CONTROL_LEFT, VKEY_CONTROL},
587 {DomCode::LANG1, VKEY_HANGUL}, 588 {DomCode::LANG1, VKEY_HANGUL},
588 {DomCode::LANG2, VKEY_HANJA}, 589 {DomCode::LANG2, VKEY_HANJA},
589 {DomCode::LANG5, VKEY_DBE_DBCSCHAR}, 590 {DomCode::LANG5, VKEY_DBE_DBCSCHAR},
590 {DomCode::NUMPAD_CLEAR, VKEY_OEM_CLEAR}, 591 {DomCode::NUMPAD_CLEAR, VKEY_OEM_CLEAR},
591 {DomCode::PROPS, VKEY_CRSEL}, 592 {DomCode::PROPS, VKEY_CRSEL},
592 {DomCode::SHIFT_LEFT, VKEY_SHIFT}, 593 {DomCode::SHIFT_LEFT, VKEY_SHIFT},
593 {DomCode::SUPER, VKEY_OEM_8}, 594 {DomCode::SUPER, VKEY_OEM_8},
594 // 595 //
595 // VKEYs with no existing corresponding DomCode, but a USB usage code: 596 // VKEYs with no existing corresponding DomCode, but a USB usage code:
596 // {DomCode::SYS_REQ, VKEY_ATTN}, // 0x07009A SysReq 597 // {DomCode::SYS_REQ, VKEY_ATTN}, // 0x07009A SysReq
597 // {DomCode::SEPARATOR, VKEY_SEPARATOR}, // 0x07009F Separator 598 // {DomCode::SEPARATOR, VKEY_SEPARATOR}, // 0x07009F Separator
598 // {DomCode::EX_SEL, VKEY_EXSEL}, // 0x0700A4 ExSel 599 // {DomCode::EX_SEL, VKEY_EXSEL}, // 0x0700A4 ExSel
599 // {DomCode::PRINT, VKEY_PRINT}, // 0x0C0208 AC Print 600 // {DomCode::PRINT, VKEY_PRINT}, // 0x0C0208 AC Print
600 // {DomCode::MEDIA_PLAY, VKEY_PLAY}, // 0x0C00B0 MediaPlay 601 // {DomCode::MEDIA_PLAY, VKEY_PLAY}, // 0x0C00B0 MediaPlay
601 // {DomCode::MEDIA_REWIND, VKEY_OEM_103}, // 0x0C00B4 MediaRewind 602 // {DomCode::MEDIA_REWIND, VKEY_OEM_103}, // 0x0C00B4 MediaRewind
602 // {DomCode::MEDIA_FAST_FORWARD, VKEY_OEM_104}, 603 // {DomCode::MEDIA_FAST_FORWARD, VKEY_OEM_104},
603 // // 0x0C00B3 MediaFastForward 604 // // 0x0C00B3 MediaFastForward
604 // 605 //
605 // VKEYs with no corresponding DomCode and no obvious USB usage code: 606 // VKEYs with no corresponding DomCode and no obvious USB usage code:
606 // VKEY_ACCEPT 607 // VKEY_ACCEPT
607 // VKEY_BACKTAB 608 // VKEY_BACKTAB
608 // VKEY_DBE_SBCSCHAR
609 // VKEY_EREOF 609 // VKEY_EREOF
610 // VKEY_FINAL 610 // VKEY_FINAL
611 // VKEY_JUNJA 611 // VKEY_JUNJA
612 // VKEY_KBD_BRIGHTNESS_DOWN 612 // VKEY_KBD_BRIGHTNESS_DOWN
613 // VKEY_KBD_BRIGHTNESS_UP 613 // VKEY_KBD_BRIGHTNESS_UP
614 // VKEY_MODECHANGE 614 // VKEY_MODECHANGE
615 // VKEY_NONAME 615 // VKEY_NONAME
616 // VKEY_PA1 616 // VKEY_PA1
617 // VKEY_PACKET 617 // VKEY_PACKET
618 // VKEY_PROCESSKEY 618 // VKEY_PROCESSKEY
619 // VKEY_WLAN 619 // VKEY_WLAN
620 }; 620 };
621 621
622 } // namespace ui 622 } // namespace ui
623 623
624 #endif // UI_EVENTS_KEYCODES_DOM_US_LAYOUT_DATA_H_ 624 #endif // UI_EVENTS_KEYCODES_DOM_US_LAYOUT_DATA_H_
OLDNEW
« no previous file with comments | « ui/base/accelerators/accelerator.cc ('k') | ui/events/keycodes/keyboard_code_conversion.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698