| Index: chrome/browser/chromeos/events/event_rewriter.cc
|
| diff --git a/chrome/browser/chromeos/events/event_rewriter.cc b/chrome/browser/chromeos/events/event_rewriter.cc
|
| index 69c2cfc5811c5c9743c6e51eef29fac2faf32298..7f6bf102142ea2f272089b31fadc4be9d493cf7d 100644
|
| --- a/chrome/browser/chromeos/events/event_rewriter.cc
|
| +++ b/chrome/browser/chromeos/events/event_rewriter.cc
|
| @@ -81,60 +81,40 @@ const struct ModifierRemapping {
|
| ui::EF_CONTROL_DOWN,
|
| input_method::kControlKey,
|
| prefs::kLanguageRemapControlKeyTo,
|
| - {ui::EF_CONTROL_DOWN,
|
| - ui::DomCode::CONTROL_LEFT,
|
| - ui::DomKey::CONTROL,
|
| - 0,
|
| + {ui::EF_CONTROL_DOWN, ui::DomCode::CONTROL_LEFT, ui::DomKey::CONTROL,
|
| ui::VKEY_CONTROL}},
|
| {// kModifierRemappingNeoMod3 references this entry by index.
|
| ui::EF_MOD3_DOWN | ui::EF_ALTGR_DOWN,
|
| input_method::kNumModifierKeys,
|
| nullptr,
|
| - {ui::EF_MOD3_DOWN | ui::EF_ALTGR_DOWN,
|
| - ui::DomCode::CAPS_LOCK,
|
| - ui::DomKey::ALT_GRAPH,
|
| - 0,
|
| - ui::VKEY_ALTGR}},
|
| + {ui::EF_MOD3_DOWN | ui::EF_ALTGR_DOWN, ui::DomCode::CAPS_LOCK,
|
| + ui::DomKey::ALT_GRAPH, ui::VKEY_ALTGR}},
|
| {ui::EF_COMMAND_DOWN,
|
| input_method::kSearchKey,
|
| prefs::kLanguageRemapSearchKeyTo,
|
| - {ui::EF_COMMAND_DOWN,
|
| - ui::DomCode::OS_LEFT,
|
| - ui::DomKey::OS,
|
| - 0,
|
| + {ui::EF_COMMAND_DOWN, ui::DomCode::OS_LEFT, ui::DomKey::OS,
|
| ui::VKEY_LWIN}},
|
| {ui::EF_ALT_DOWN,
|
| input_method::kAltKey,
|
| prefs::kLanguageRemapAltKeyTo,
|
| - {ui::EF_ALT_DOWN,
|
| - ui::DomCode::ALT_LEFT,
|
| - ui::DomKey::ALT,
|
| - 0,
|
| - ui::VKEY_MENU}},
|
| + {ui::EF_ALT_DOWN, ui::DomCode::ALT_LEFT, ui::DomKey::ALT, ui::VKEY_MENU}},
|
| {ui::EF_NONE,
|
| input_method::kVoidKey,
|
| nullptr,
|
| - {ui::EF_NONE, ui::DomCode::NONE, ui::DomKey::NONE, 0, ui::VKEY_UNKNOWN}},
|
| + {ui::EF_NONE, ui::DomCode::NONE, ui::DomKey::NONE, ui::VKEY_UNKNOWN}},
|
| {ui::EF_MOD3_DOWN,
|
| input_method::kCapsLockKey,
|
| prefs::kLanguageRemapCapsLockKeyTo,
|
| - {ui::EF_MOD3_DOWN,
|
| - ui::DomCode::CAPS_LOCK,
|
| - ui::DomKey::CAPS_LOCK,
|
| - 0,
|
| + {ui::EF_MOD3_DOWN, ui::DomCode::CAPS_LOCK, ui::DomKey::CAPS_LOCK,
|
| ui::VKEY_CAPITAL}},
|
| {ui::EF_NONE,
|
| input_method::kEscapeKey,
|
| nullptr,
|
| - {ui::EF_NONE,
|
| - ui::DomCode::ESCAPE,
|
| - ui::DomKey::ESCAPE,
|
| - 0,
|
| - ui::VKEY_ESCAPE}},
|
| + {ui::EF_NONE, ui::DomCode::ESCAPE, ui::DomKey::ESCAPE, ui::VKEY_ESCAPE}},
|
| {ui::EF_NONE,
|
| input_method::kNumModifierKeys,
|
| prefs::kLanguageRemapDiamondKeyTo,
|
| - {ui::EF_NONE, ui::DomCode::F15, ui::DomKey::F15, 0, ui::VKEY_F15}}};
|
| + {ui::EF_NONE, ui::DomCode::F15, ui::DomKey::F15, ui::VKEY_F15}}};
|
|
|
| const ModifierRemapping* kModifierRemappingCtrl = &kModifierRemappings[0];
|
| const ModifierRemapping* kModifierRemappingNeoMod3 = &kModifierRemappings[1];
|
| @@ -250,10 +230,8 @@ void ApplyRemapping(const EventRewriter::MutableKeyState& changes,
|
| state->flags |= changes.flags;
|
| if (changes.code != ui::DomCode::NONE)
|
| state->code = changes.code;
|
| - if (changes.key != ui::DomKey::NONE) {
|
| + if (changes.key != ui::DomKey::NONE)
|
| state->key = changes.key;
|
| - state->character = changes.character;
|
| - }
|
| if (changes.key_code != ui::VKEY_UNKNOWN)
|
| state->key_code = changes.key_code;
|
| }
|
| @@ -283,7 +261,6 @@ void SetMeaningForLayout(ui::EventType type,
|
| // current physical state, and extracting the layout results.
|
| ui::KeyEvent key(type, state->key_code, state->code, state->flags);
|
| state->key = key.GetDomKey();
|
| - state->character = key.GetCharacter();
|
| }
|
|
|
| ui::DomCode RelocateModifier(ui::DomCode code, ui::DomKeyLocation location) {
|
| @@ -319,8 +296,7 @@ EventRewriter::EventRewriter(ash::StickyKeysController* sticky_keys_controller)
|
| latched_modifier_latches_(ui::EF_NONE),
|
| used_modifier_latches_(ui::EF_NONE) {}
|
|
|
| -EventRewriter::~EventRewriter() {
|
| -}
|
| +EventRewriter::~EventRewriter() {}
|
|
|
| EventRewriter::DeviceType EventRewriter::KeyboardDeviceAddedForTesting(
|
| int device_id,
|
| @@ -385,9 +361,9 @@ void EventRewriter::BuildRewrittenKeyEvent(
|
| const ui::KeyEvent& key_event,
|
| const MutableKeyState& state,
|
| scoped_ptr<ui::Event>* rewritten_event) {
|
| - ui::KeyEvent* rewritten_key_event = new ui::KeyEvent(
|
| - key_event.type(), state.key_code, state.code, state.flags, state.key,
|
| - state.character, key_event.time_stamp());
|
| + ui::KeyEvent* rewritten_key_event =
|
| + new ui::KeyEvent(key_event.type(), state.key_code, state.code,
|
| + state.flags, state.key, key_event.time_stamp());
|
| rewritten_event->reset(rewritten_key_event);
|
| }
|
|
|
| @@ -516,11 +492,8 @@ ui::EventRewriteStatus EventRewriter::RewriteKeyEvent(
|
| return ui::EVENT_REWRITE_DISCARD;
|
| }
|
|
|
| - MutableKeyState state = {key_event.flags(),
|
| - key_event.code(),
|
| - key_event.GetDomKey(),
|
| - key_event.GetCharacter(),
|
| - key_event.key_code()};
|
| + MutableKeyState state = {key_event.flags(), key_event.code(),
|
| + key_event.GetDomKey(), key_event.key_code()};
|
|
|
| // Do not rewrite an event sent by ui_controls::SendKeyPress(). See
|
| // crbug.com/136465.
|
| @@ -808,7 +781,6 @@ bool EventRewriter::RewriteModifierKeys(const ui::KeyEvent& key_event,
|
| state->key_code = remapped_key->result.key_code;
|
| state->code = remapped_key->result.code;
|
| state->key = remapped_key->result.key;
|
| - state->character = remapped_key->result.character;
|
| incoming.flags |= characteristic_flag;
|
| characteristic_flag = remapped_key->flag;
|
| state->code = RelocateModifier(
|
| @@ -855,72 +827,40 @@ void EventRewriter::RewriteNumPadKeys(const ui::KeyEvent& key_event,
|
| static const struct NumPadRemapping {
|
| ui::KeyboardCode input_key_code;
|
| EventRewriter::MutableKeyState result;
|
| - } kNumPadRemappings[] = {{ui::VKEY_DELETE,
|
| - {ui::EF_NONE,
|
| - ui::DomCode::NONE,
|
| - ui::DomKey::CHARACTER,
|
| - '.',
|
| - ui::VKEY_DECIMAL}},
|
| - {ui::VKEY_INSERT,
|
| - {ui::EF_NONE,
|
| - ui::DomCode::NONE,
|
| - ui::DomKey::CHARACTER,
|
| - '0',
|
| - ui::VKEY_NUMPAD0}},
|
| - {ui::VKEY_END,
|
| - {ui::EF_NONE,
|
| - ui::DomCode::NONE,
|
| - ui::DomKey::CHARACTER,
|
| - '1',
|
| - ui::VKEY_NUMPAD1}},
|
| - {ui::VKEY_DOWN,
|
| - {ui::EF_NONE,
|
| - ui::DomCode::NONE,
|
| - ui::DomKey::CHARACTER,
|
| - '2',
|
| - ui::VKEY_NUMPAD2}},
|
| - {ui::VKEY_NEXT,
|
| - {ui::EF_NONE,
|
| - ui::DomCode::NONE,
|
| - ui::DomKey::CHARACTER,
|
| - '3',
|
| - ui::VKEY_NUMPAD3}},
|
| - {ui::VKEY_LEFT,
|
| - {ui::EF_NONE,
|
| - ui::DomCode::NONE,
|
| - ui::DomKey::CHARACTER,
|
| - '4',
|
| - ui::VKEY_NUMPAD4}},
|
| - {ui::VKEY_CLEAR,
|
| - {ui::EF_NONE,
|
| - ui::DomCode::NONE,
|
| - ui::DomKey::CHARACTER,
|
| - '5',
|
| - ui::VKEY_NUMPAD5}},
|
| - {ui::VKEY_RIGHT,
|
| - {ui::EF_NONE,
|
| - ui::DomCode::NONE,
|
| - ui::DomKey::CHARACTER,
|
| - '6',
|
| - ui::VKEY_NUMPAD6}},
|
| - {ui::VKEY_HOME,
|
| - {ui::EF_NONE,
|
| - ui::DomCode::NONE,
|
| - ui::DomKey::CHARACTER,
|
| - '7',
|
| - ui::VKEY_NUMPAD7}},
|
| - {ui::VKEY_UP,
|
| - {ui::EF_NONE,
|
| - ui::DomCode::NONE,
|
| - ui::DomKey::CHARACTER,
|
| - '8',
|
| - ui::VKEY_NUMPAD8}},
|
| - {ui::VKEY_PRIOR,
|
| - {ui::EF_NONE,
|
| - ui::DomCode::NONE,
|
| - ui::DomKey::CHARACTER,
|
| - '9',
|
| - ui::VKEY_NUMPAD9}}};
|
| + } kNumPadRemappings[] = {
|
| + {ui::VKEY_DELETE,
|
| + {ui::EF_NONE, ui::DomCode::NONE, ui::DomKey::Constant<'.'>::Character,
|
| + ui::VKEY_DECIMAL}},
|
| + {ui::VKEY_INSERT,
|
| + {ui::EF_NONE, ui::DomCode::NONE, ui::DomKey::Constant<'0'>::Character,
|
| + ui::VKEY_NUMPAD0}},
|
| + {ui::VKEY_END,
|
| + {ui::EF_NONE, ui::DomCode::NONE, ui::DomKey::Constant<'1'>::Character,
|
| + ui::VKEY_NUMPAD1}},
|
| + {ui::VKEY_DOWN,
|
| + {ui::EF_NONE, ui::DomCode::NONE, ui::DomKey::Constant<'2'>::Character,
|
| + ui::VKEY_NUMPAD2}},
|
| + {ui::VKEY_NEXT,
|
| + {ui::EF_NONE, ui::DomCode::NONE, ui::DomKey::Constant<'3'>::Character,
|
| + ui::VKEY_NUMPAD3}},
|
| + {ui::VKEY_LEFT,
|
| + {ui::EF_NONE, ui::DomCode::NONE, ui::DomKey::Constant<'4'>::Character,
|
| + ui::VKEY_NUMPAD4}},
|
| + {ui::VKEY_CLEAR,
|
| + {ui::EF_NONE, ui::DomCode::NONE, ui::DomKey::Constant<'5'>::Character,
|
| + ui::VKEY_NUMPAD5}},
|
| + {ui::VKEY_RIGHT,
|
| + {ui::EF_NONE, ui::DomCode::NONE, ui::DomKey::Constant<'6'>::Character,
|
| + ui::VKEY_NUMPAD6}},
|
| + {ui::VKEY_HOME,
|
| + {ui::EF_NONE, ui::DomCode::NONE, ui::DomKey::Constant<'7'>::Character,
|
| + ui::VKEY_NUMPAD7}},
|
| + {ui::VKEY_UP,
|
| + {ui::EF_NONE, ui::DomCode::NONE, ui::DomKey::Constant<'8'>::Character,
|
| + ui::VKEY_NUMPAD8}},
|
| + {ui::VKEY_PRIOR,
|
| + {ui::EF_NONE, ui::DomCode::NONE, ui::DomKey::Constant<'9'>::Character,
|
| + ui::VKEY_NUMPAD9}}};
|
| for (const auto& map : kNumPadRemappings) {
|
| if (state->key_code == map.input_key_code) {
|
| if (ui::KeycodeConverter::DomCodeToLocation(state->code) ==
|
| @@ -944,20 +884,17 @@ void EventRewriter::RewriteExtendedKeys(const ui::KeyEvent& key_event,
|
| // For these, we only remove the EF_COMMAND_DOWN flag.
|
| static const KeyboardRemapping::Condition kAvoidRemappings[] = {
|
| {// Alt+Backspace
|
| - ui::EF_ALT_DOWN | ui::EF_COMMAND_DOWN,
|
| - ui::VKEY_BACK},
|
| + ui::EF_ALT_DOWN | ui::EF_COMMAND_DOWN, ui::VKEY_BACK},
|
| {// Control+Alt+Up
|
| ui::EF_ALT_DOWN | ui::EF_CONTROL_DOWN | ui::EF_COMMAND_DOWN,
|
| ui::VKEY_UP},
|
| {// Alt+Up
|
| - ui::EF_ALT_DOWN | ui::EF_COMMAND_DOWN,
|
| - ui::VKEY_UP},
|
| + ui::EF_ALT_DOWN | ui::EF_COMMAND_DOWN, ui::VKEY_UP},
|
| {// Control+Alt+Down
|
| ui::EF_ALT_DOWN | ui::EF_CONTROL_DOWN | ui::EF_COMMAND_DOWN,
|
| ui::VKEY_DOWN},
|
| {// Alt+Down
|
| - ui::EF_ALT_DOWN | ui::EF_COMMAND_DOWN,
|
| - ui::VKEY_DOWN}};
|
| + ui::EF_ALT_DOWN | ui::EF_COMMAND_DOWN, ui::VKEY_DOWN}};
|
| for (const auto& condition : kAvoidRemappings) {
|
| if (MatchKeyboardRemapping(*state, condition)) {
|
| state->flags = incoming.flags & ~ui::EF_COMMAND_DOWN;
|
| @@ -970,37 +907,24 @@ void EventRewriter::RewriteExtendedKeys(const ui::KeyEvent& key_event,
|
| static const KeyboardRemapping kSearchRemappings[] = {
|
| {// Search+BackSpace -> Delete
|
| {ui::EF_COMMAND_DOWN, ui::VKEY_BACK},
|
| - {ui::EF_NONE,
|
| - ui::DomCode::DEL,
|
| - ui::DomKey::DEL,
|
| - 0x7F,
|
| - ui::VKEY_DELETE}},
|
| + {ui::EF_NONE, ui::DomCode::DEL, ui::DomKey::DEL, ui::VKEY_DELETE}},
|
| {// Search+Left -> Home
|
| {ui::EF_COMMAND_DOWN, ui::VKEY_LEFT},
|
| - {ui::EF_NONE, ui::DomCode::HOME, ui::DomKey::HOME, 0, ui::VKEY_HOME}},
|
| + {ui::EF_NONE, ui::DomCode::HOME, ui::DomKey::HOME, ui::VKEY_HOME}},
|
| {// Search+Up -> Prior (aka PageUp)
|
| {ui::EF_COMMAND_DOWN, ui::VKEY_UP},
|
| - {ui::EF_NONE,
|
| - ui::DomCode::PAGE_UP,
|
| - ui::DomKey::PAGE_UP,
|
| - 0,
|
| + {ui::EF_NONE, ui::DomCode::PAGE_UP, ui::DomKey::PAGE_UP,
|
| ui::VKEY_PRIOR}},
|
| {// Search+Right -> End
|
| {ui::EF_COMMAND_DOWN, ui::VKEY_RIGHT},
|
| - {ui::EF_NONE, ui::DomCode::END, ui::DomKey::END, 0, ui::VKEY_END}},
|
| + {ui::EF_NONE, ui::DomCode::END, ui::DomKey::END, ui::VKEY_END}},
|
| {// Search+Down -> Next (aka PageDown)
|
| {ui::EF_COMMAND_DOWN, ui::VKEY_DOWN},
|
| - {ui::EF_NONE,
|
| - ui::DomCode::PAGE_DOWN,
|
| - ui::DomKey::PAGE_DOWN,
|
| - 0,
|
| + {ui::EF_NONE, ui::DomCode::PAGE_DOWN, ui::DomKey::PAGE_DOWN,
|
| ui::VKEY_NEXT}},
|
| {// Search+Period -> Insert
|
| {ui::EF_COMMAND_DOWN, ui::VKEY_OEM_PERIOD},
|
| - {ui::EF_NONE,
|
| - ui::DomCode::INSERT,
|
| - ui::DomKey::INSERT,
|
| - 0,
|
| + {ui::EF_NONE, ui::DomCode::INSERT, ui::DomKey::INSERT,
|
| ui::VKEY_INSERT}}};
|
| if (RewriteWithKeyboardRemappings(
|
| kSearchRemappings, arraysize(kSearchRemappings), incoming, state)) {
|
| @@ -1012,30 +936,20 @@ void EventRewriter::RewriteExtendedKeys(const ui::KeyEvent& key_event,
|
| static const KeyboardRemapping kNonSearchRemappings[] = {
|
| {// Alt+BackSpace -> Delete
|
| {ui::EF_ALT_DOWN, ui::VKEY_BACK},
|
| - {ui::EF_NONE,
|
| - ui::DomCode::DEL,
|
| - ui::DomKey::DEL,
|
| - 0x7F,
|
| - ui::VKEY_DELETE}},
|
| + {ui::EF_NONE, ui::DomCode::DEL, ui::DomKey::DEL, ui::VKEY_DELETE}},
|
| {// Control+Alt+Up -> Home
|
| {ui::EF_ALT_DOWN | ui::EF_CONTROL_DOWN, ui::VKEY_UP},
|
| - {ui::EF_NONE, ui::DomCode::HOME, ui::DomKey::HOME, 0, ui::VKEY_HOME}},
|
| + {ui::EF_NONE, ui::DomCode::HOME, ui::DomKey::HOME, ui::VKEY_HOME}},
|
| {// Alt+Up -> Prior (aka PageUp)
|
| {ui::EF_ALT_DOWN, ui::VKEY_UP},
|
| - {ui::EF_NONE,
|
| - ui::DomCode::PAGE_UP,
|
| - ui::DomKey::PAGE_UP,
|
| - 0,
|
| + {ui::EF_NONE, ui::DomCode::PAGE_UP, ui::DomKey::PAGE_UP,
|
| ui::VKEY_PRIOR}},
|
| {// Control+Alt+Down -> End
|
| {ui::EF_ALT_DOWN | ui::EF_CONTROL_DOWN, ui::VKEY_DOWN},
|
| - {ui::EF_NONE, ui::DomCode::END, ui::DomKey::END, 0, ui::VKEY_END}},
|
| + {ui::EF_NONE, ui::DomCode::END, ui::DomKey::END, ui::VKEY_END}},
|
| {// Alt+Down -> Next (aka PageDown)
|
| {ui::EF_ALT_DOWN, ui::VKEY_DOWN},
|
| - {ui::EF_NONE,
|
| - ui::DomCode::PAGE_DOWN,
|
| - ui::DomKey::PAGE_DOWN,
|
| - 0,
|
| + {ui::EF_NONE, ui::DomCode::PAGE_DOWN, ui::DomKey::PAGE_DOWN,
|
| ui::VKEY_NEXT}}};
|
| if (RewriteWithKeyboardRemappings(kNonSearchRemappings,
|
| arraysize(kNonSearchRemappings), incoming,
|
| @@ -1067,64 +981,34 @@ void EventRewriter::RewriteFunctionKeys(const ui::KeyEvent& key_event,
|
| // Rewrite the F1-F12 keys on a Chromebook keyboard to system keys.
|
| static const KeyboardRemapping kFkeysToSystemKeys[] = {
|
| {{ui::EF_NONE, ui::VKEY_F1},
|
| - {ui::EF_NONE,
|
| - ui::DomCode::BROWSER_BACK,
|
| - ui::DomKey::BROWSER_BACK,
|
| - 0,
|
| + {ui::EF_NONE, ui::DomCode::BROWSER_BACK, ui::DomKey::BROWSER_BACK,
|
| ui::VKEY_BROWSER_BACK}},
|
| {{ui::EF_NONE, ui::VKEY_F2},
|
| - {ui::EF_NONE,
|
| - ui::DomCode::BROWSER_FORWARD,
|
| - ui::DomKey::BROWSER_FORWARD,
|
| - 0,
|
| - ui::VKEY_BROWSER_FORWARD}},
|
| + {ui::EF_NONE, ui::DomCode::BROWSER_FORWARD,
|
| + ui::DomKey::BROWSER_FORWARD, ui::VKEY_BROWSER_FORWARD}},
|
| {{ui::EF_NONE, ui::VKEY_F3},
|
| - {ui::EF_NONE,
|
| - ui::DomCode::BROWSER_REFRESH,
|
| - ui::DomKey::BROWSER_REFRESH,
|
| - 0,
|
| - ui::VKEY_BROWSER_REFRESH}},
|
| + {ui::EF_NONE, ui::DomCode::BROWSER_REFRESH,
|
| + ui::DomKey::BROWSER_REFRESH, ui::VKEY_BROWSER_REFRESH}},
|
| {{ui::EF_NONE, ui::VKEY_F4},
|
| - {ui::EF_NONE,
|
| - ui::DomCode::ZOOM_TOGGLE,
|
| - ui::DomKey::ZOOM_TOGGLE,
|
| - 0,
|
| + {ui::EF_NONE, ui::DomCode::ZOOM_TOGGLE, ui::DomKey::ZOOM_TOGGLE,
|
| ui::VKEY_MEDIA_LAUNCH_APP2}},
|
| {{ui::EF_NONE, ui::VKEY_F5},
|
| - {ui::EF_NONE,
|
| - ui::DomCode::SELECT_TASK,
|
| - ui::DomKey::LAUNCH_MY_COMPUTER,
|
| - 0,
|
| - ui::VKEY_MEDIA_LAUNCH_APP1}},
|
| + {ui::EF_NONE, ui::DomCode::SELECT_TASK,
|
| + ui::DomKey::LAUNCH_MY_COMPUTER, ui::VKEY_MEDIA_LAUNCH_APP1}},
|
| {{ui::EF_NONE, ui::VKEY_F6},
|
| - {ui::EF_NONE,
|
| - ui::DomCode::BRIGHTNESS_DOWN,
|
| - ui::DomKey::BRIGHTNESS_DOWN,
|
| - 0,
|
| - ui::VKEY_BRIGHTNESS_DOWN}},
|
| + {ui::EF_NONE, ui::DomCode::BRIGHTNESS_DOWN,
|
| + ui::DomKey::BRIGHTNESS_DOWN, ui::VKEY_BRIGHTNESS_DOWN}},
|
| {{ui::EF_NONE, ui::VKEY_F7},
|
| - {ui::EF_NONE,
|
| - ui::DomCode::BRIGHTNESS_UP,
|
| - ui::DomKey::BRIGHTNESS_UP,
|
| - 0,
|
| + {ui::EF_NONE, ui::DomCode::BRIGHTNESS_UP, ui::DomKey::BRIGHTNESS_UP,
|
| ui::VKEY_BRIGHTNESS_UP}},
|
| {{ui::EF_NONE, ui::VKEY_F8},
|
| - {ui::EF_NONE,
|
| - ui::DomCode::VOLUME_MUTE,
|
| - ui::DomKey::VOLUME_MUTE,
|
| - 0,
|
| + {ui::EF_NONE, ui::DomCode::VOLUME_MUTE, ui::DomKey::VOLUME_MUTE,
|
| ui::VKEY_VOLUME_MUTE}},
|
| {{ui::EF_NONE, ui::VKEY_F9},
|
| - {ui::EF_NONE,
|
| - ui::DomCode::VOLUME_DOWN,
|
| - ui::DomKey::VOLUME_DOWN,
|
| - 0,
|
| + {ui::EF_NONE, ui::DomCode::VOLUME_DOWN, ui::DomKey::VOLUME_DOWN,
|
| ui::VKEY_VOLUME_DOWN}},
|
| {{ui::EF_NONE, ui::VKEY_F10},
|
| - {ui::EF_NONE,
|
| - ui::DomCode::VOLUME_UP,
|
| - ui::DomKey::VOLUME_UP,
|
| - 0,
|
| + {ui::EF_NONE, ui::DomCode::VOLUME_UP, ui::DomKey::VOLUME_UP,
|
| ui::VKEY_VOLUME_UP}},
|
| };
|
| MutableKeyState incoming_without_command = *state;
|
| @@ -1150,29 +1034,29 @@ void EventRewriter::RewriteFunctionKeys(const ui::KeyEvent& key_event,
|
| EventRewriter::MutableKeyState result;
|
| } kNumberKeysToFkeys[] = {
|
| {ui::DomCode::DIGIT1,
|
| - {ui::EF_NONE, ui::DomCode::F1, ui::DomKey::F1, 0, ui::VKEY_F1}},
|
| + {ui::EF_NONE, ui::DomCode::F1, ui::DomKey::F1, ui::VKEY_F1}},
|
| {ui::DomCode::DIGIT2,
|
| - {ui::EF_NONE, ui::DomCode::F2, ui::DomKey::F2, 0, ui::VKEY_F2}},
|
| + {ui::EF_NONE, ui::DomCode::F2, ui::DomKey::F2, ui::VKEY_F2}},
|
| {ui::DomCode::DIGIT3,
|
| - {ui::EF_NONE, ui::DomCode::F3, ui::DomKey::F3, 0, ui::VKEY_F3}},
|
| + {ui::EF_NONE, ui::DomCode::F3, ui::DomKey::F3, ui::VKEY_F3}},
|
| {ui::DomCode::DIGIT4,
|
| - {ui::EF_NONE, ui::DomCode::F4, ui::DomKey::F4, 0, ui::VKEY_F4}},
|
| + {ui::EF_NONE, ui::DomCode::F4, ui::DomKey::F4, ui::VKEY_F4}},
|
| {ui::DomCode::DIGIT5,
|
| - {ui::EF_NONE, ui::DomCode::F5, ui::DomKey::F5, 0, ui::VKEY_F5}},
|
| + {ui::EF_NONE, ui::DomCode::F5, ui::DomKey::F5, ui::VKEY_F5}},
|
| {ui::DomCode::DIGIT6,
|
| - {ui::EF_NONE, ui::DomCode::F6, ui::DomKey::F6, 0, ui::VKEY_F6}},
|
| + {ui::EF_NONE, ui::DomCode::F6, ui::DomKey::F6, ui::VKEY_F6}},
|
| {ui::DomCode::DIGIT7,
|
| - {ui::EF_NONE, ui::DomCode::F7, ui::DomKey::F7, 0, ui::VKEY_F7}},
|
| + {ui::EF_NONE, ui::DomCode::F7, ui::DomKey::F7, ui::VKEY_F7}},
|
| {ui::DomCode::DIGIT8,
|
| - {ui::EF_NONE, ui::DomCode::F8, ui::DomKey::F8, 0, ui::VKEY_F8}},
|
| + {ui::EF_NONE, ui::DomCode::F8, ui::DomKey::F8, ui::VKEY_F8}},
|
| {ui::DomCode::DIGIT9,
|
| - {ui::EF_NONE, ui::DomCode::F9, ui::DomKey::F9, 0, ui::VKEY_F9}},
|
| + {ui::EF_NONE, ui::DomCode::F9, ui::DomKey::F9, ui::VKEY_F9}},
|
| {ui::DomCode::DIGIT0,
|
| - {ui::EF_NONE, ui::DomCode::F10, ui::DomKey::F10, 0, ui::VKEY_F10}},
|
| + {ui::EF_NONE, ui::DomCode::F10, ui::DomKey::F10, ui::VKEY_F10}},
|
| {ui::DomCode::MINUS,
|
| - {ui::EF_NONE, ui::DomCode::F11, ui::DomKey::F11, 0, ui::VKEY_F11}},
|
| + {ui::EF_NONE, ui::DomCode::F11, ui::DomKey::F11, ui::VKEY_F11}},
|
| {ui::DomCode::EQUAL,
|
| - {ui::EF_NONE, ui::DomCode::F12, ui::DomKey::F12, 0, ui::VKEY_F12}}};
|
| + {ui::EF_NONE, ui::DomCode::F12, ui::DomKey::F12, ui::VKEY_F12}}};
|
| for (const auto& map : kNumberKeysToFkeys) {
|
| if (state->code == map.input_dom_code) {
|
| state->flags &= ~ui::EF_COMMAND_DOWN;
|
|
|