| Index: chrome/browser/chromeos/events/event_rewriter_unittest.cc
|
| diff --git a/chrome/browser/chromeos/events/event_rewriter_unittest.cc b/chrome/browser/chromeos/events/event_rewriter_unittest.cc
|
| index 23e06aafd14c9e232c7363dbdd18928689013705..7b5b2b44bc0ed2b7109ebd66952c2c442bf6e4ae 100644
|
| --- a/chrome/browser/chromeos/events/event_rewriter_unittest.cc
|
| +++ b/chrome/browser/chromeos/events/event_rewriter_unittest.cc
|
| @@ -57,18 +57,17 @@ std::string GetExpectedResultAsString(ui::EventType ui_type,
|
| ui::KeyboardCode ui_keycode,
|
| ui::DomCode code,
|
| int ui_flags, // ui::EventFlags
|
| - ui::DomKey key,
|
| - base::char16 character) {
|
| + ui::DomKey key) {
|
| return base::StringPrintf(
|
| - "type=%d code=0x%06X flags=0x%X vk=0x%02X key=0x%03X c=0x%02X", ui_type,
|
| + "type=%d code=0x%06X flags=0x%X vk=0x%02X key=0x%08X", ui_type,
|
| static_cast<unsigned int>(code), ui_flags & ~ui::EF_IS_REPEAT, ui_keycode,
|
| - static_cast<unsigned int>(key), character);
|
| + static_cast<unsigned int>(key));
|
| }
|
|
|
| std::string GetKeyEventAsString(const ui::KeyEvent& keyevent) {
|
| - return GetExpectedResultAsString(
|
| - keyevent.type(), keyevent.key_code(), keyevent.code(), keyevent.flags(),
|
| - keyevent.GetDomKey(), keyevent.GetCharacter());
|
| + return GetExpectedResultAsString(keyevent.type(), keyevent.key_code(),
|
| + keyevent.code(), keyevent.flags(),
|
| + keyevent.GetDomKey());
|
| }
|
|
|
| std::string GetRewrittenEventAsString(chromeos::EventRewriter* rewriter,
|
| @@ -76,9 +75,8 @@ std::string GetRewrittenEventAsString(chromeos::EventRewriter* rewriter,
|
| ui::KeyboardCode ui_keycode,
|
| ui::DomCode code,
|
| int ui_flags, // ui::EventFlags
|
| - ui::DomKey key,
|
| - base::char16 character) {
|
| - const ui::KeyEvent event(ui_type, ui_keycode, code, ui_flags, key, character,
|
| + ui::DomKey key) {
|
| + const ui::KeyEvent event(ui_type, ui_keycode, code, ui_flags, key,
|
| ui::EventTimeForNow());
|
| scoped_ptr<ui::Event> new_event;
|
| rewriter->RewriteEvent(event, &new_event);
|
| @@ -95,15 +93,14 @@ struct KeyTestCase {
|
| ui::KeyboardCode key_code;
|
| ui::DomCode code;
|
| int flags; // ui::EventFlags
|
| - ui::DomKey key;
|
| - base::char16 character;
|
| + ui::DomKey::Base key;
|
| } input, expected;
|
| };
|
|
|
| std::string GetTestCaseAsString(ui::EventType ui_type,
|
| const KeyTestCase::Event& test) {
|
| return GetExpectedResultAsString(ui_type, test.key_code, test.code,
|
| - test.flags, test.key, test.character);
|
| + test.flags, test.key);
|
| }
|
|
|
| // Tests a single stateless key rewrite operation.
|
| @@ -111,10 +108,9 @@ void CheckKeyTestCase(chromeos::EventRewriter* rewriter,
|
| const KeyTestCase& test) {
|
| SCOPED_TRACE("\nSource: " + GetTestCaseAsString(test.type, test.input));
|
| std::string expected = GetTestCaseAsString(test.type, test.expected);
|
| - EXPECT_EQ(expected,
|
| - GetRewrittenEventAsString(rewriter, test.type, test.input.key_code,
|
| - test.input.code, test.input.flags,
|
| - test.input.key, test.input.character));
|
| + EXPECT_EQ(expected, GetRewrittenEventAsString(
|
| + rewriter, test.type, test.input.key_code,
|
| + test.input.code, test.input.flags, test.input.key));
|
| }
|
|
|
| } // namespace
|
| @@ -173,68 +169,38 @@ TEST_F(EventRewriterTest, TestRewriteCommandToControl) {
|
| KeyTestCase pc_keyboard_tests[] = {
|
| // VKEY_A, Alt modifier.
|
| {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_A,
|
| - ui::DomCode::KEY_A,
|
| - ui::EF_ALT_DOWN,
|
| - ui::DomKey::UNIDENTIFIED,
|
| - 0},
|
| - {ui::VKEY_A,
|
| - ui::DomCode::KEY_A,
|
| - ui::EF_ALT_DOWN,
|
| - ui::DomKey::UNIDENTIFIED,
|
| - 0}},
|
| + {ui::VKEY_A, ui::DomCode::KEY_A, ui::EF_ALT_DOWN,
|
| + ui::DomKey::UNIDENTIFIED},
|
| + {ui::VKEY_A, ui::DomCode::KEY_A, ui::EF_ALT_DOWN,
|
| + ui::DomKey::UNIDENTIFIED}},
|
|
|
| // VKEY_A, Win modifier.
|
| {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_A,
|
| - ui::DomCode::KEY_A,
|
| - ui::EF_COMMAND_DOWN,
|
| - ui::DomKey::UNIDENTIFIED,
|
| - 0},
|
| - {ui::VKEY_A,
|
| - ui::DomCode::KEY_A,
|
| - ui::EF_COMMAND_DOWN,
|
| - ui::DomKey::UNIDENTIFIED,
|
| - 0}},
|
| + {ui::VKEY_A, ui::DomCode::KEY_A, ui::EF_COMMAND_DOWN,
|
| + ui::DomKey::UNIDENTIFIED},
|
| + {ui::VKEY_A, ui::DomCode::KEY_A, ui::EF_COMMAND_DOWN,
|
| + ui::DomKey::UNIDENTIFIED}},
|
|
|
| // VKEY_A, Alt+Win modifier.
|
| {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_A,
|
| - ui::DomCode::KEY_A,
|
| - ui::EF_ALT_DOWN | ui::EF_COMMAND_DOWN,
|
| - ui::DomKey::UNIDENTIFIED,
|
| - 0},
|
| - {ui::VKEY_A,
|
| - ui::DomCode::KEY_A,
|
| - ui::EF_ALT_DOWN | ui::EF_COMMAND_DOWN,
|
| - ui::DomKey::UNIDENTIFIED,
|
| - 0}},
|
| + {ui::VKEY_A, ui::DomCode::KEY_A, ui::EF_ALT_DOWN | ui::EF_COMMAND_DOWN,
|
| + ui::DomKey::UNIDENTIFIED},
|
| + {ui::VKEY_A, ui::DomCode::KEY_A, ui::EF_ALT_DOWN | ui::EF_COMMAND_DOWN,
|
| + ui::DomKey::UNIDENTIFIED}},
|
|
|
| // VKEY_LWIN (left Windows key), Alt modifier.
|
| {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_LWIN,
|
| - ui::DomCode::OS_LEFT,
|
| - ui::EF_ALT_DOWN | ui::EF_COMMAND_DOWN,
|
| - ui::DomKey::OS,
|
| - 0},
|
| - {ui::VKEY_LWIN,
|
| - ui::DomCode::OS_LEFT,
|
| - ui::EF_ALT_DOWN | ui::EF_COMMAND_DOWN,
|
| - ui::DomKey::OS,
|
| - 0}},
|
| + {ui::VKEY_LWIN, ui::DomCode::OS_LEFT,
|
| + ui::EF_ALT_DOWN | ui::EF_COMMAND_DOWN, ui::DomKey::OS},
|
| + {ui::VKEY_LWIN, ui::DomCode::OS_LEFT,
|
| + ui::EF_ALT_DOWN | ui::EF_COMMAND_DOWN, ui::DomKey::OS}},
|
|
|
| // VKEY_RWIN (right Windows key), Alt modifier.
|
| {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_RWIN,
|
| - ui::DomCode::OS_RIGHT,
|
| - ui::EF_ALT_DOWN | ui::EF_COMMAND_DOWN,
|
| - ui::DomKey::OS,
|
| - 0},
|
| - {ui::VKEY_RWIN,
|
| - ui::DomCode::OS_RIGHT,
|
| - ui::EF_ALT_DOWN | ui::EF_COMMAND_DOWN,
|
| - ui::DomKey::OS,
|
| - 0}},
|
| + {ui::VKEY_RWIN, ui::DomCode::OS_RIGHT,
|
| + ui::EF_ALT_DOWN | ui::EF_COMMAND_DOWN, ui::DomKey::OS},
|
| + {ui::VKEY_RWIN, ui::DomCode::OS_RIGHT,
|
| + ui::EF_ALT_DOWN | ui::EF_COMMAND_DOWN, ui::DomKey::OS}},
|
| };
|
|
|
| for (const auto& test : pc_keyboard_tests) {
|
| @@ -248,68 +214,38 @@ TEST_F(EventRewriterTest, TestRewriteCommandToControl) {
|
| KeyTestCase apple_keyboard_tests[] = {
|
| // VKEY_A, Alt modifier.
|
| {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_A,
|
| - ui::DomCode::KEY_A,
|
| - ui::EF_ALT_DOWN,
|
| - ui::DomKey::UNIDENTIFIED,
|
| - 0},
|
| - {ui::VKEY_A,
|
| - ui::DomCode::KEY_A,
|
| - ui::EF_ALT_DOWN,
|
| - ui::DomKey::UNIDENTIFIED,
|
| - 0}},
|
| + {ui::VKEY_A, ui::DomCode::KEY_A, ui::EF_ALT_DOWN,
|
| + ui::DomKey::UNIDENTIFIED},
|
| + {ui::VKEY_A, ui::DomCode::KEY_A, ui::EF_ALT_DOWN,
|
| + ui::DomKey::UNIDENTIFIED}},
|
|
|
| // VKEY_A, Win modifier.
|
| {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_A,
|
| - ui::DomCode::KEY_A,
|
| - ui::EF_COMMAND_DOWN,
|
| - ui::DomKey::UNIDENTIFIED,
|
| - 0},
|
| - {ui::VKEY_A,
|
| - ui::DomCode::KEY_A,
|
| - ui::EF_CONTROL_DOWN,
|
| - ui::DomKey::CHARACTER,
|
| - 0x01}},
|
| + {ui::VKEY_A, ui::DomCode::KEY_A, ui::EF_COMMAND_DOWN,
|
| + ui::DomKey::UNIDENTIFIED},
|
| + {ui::VKEY_A, ui::DomCode::KEY_A, ui::EF_CONTROL_DOWN,
|
| + ui::DomKey::Constant<0x01>::Character}},
|
|
|
| // VKEY_A, Alt+Win modifier.
|
| {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_A,
|
| - ui::DomCode::KEY_A,
|
| - ui::EF_ALT_DOWN | ui::EF_COMMAND_DOWN,
|
| - ui::DomKey::UNIDENTIFIED,
|
| - 0},
|
| - {ui::VKEY_A,
|
| - ui::DomCode::KEY_A,
|
| - ui::EF_ALT_DOWN | ui::EF_CONTROL_DOWN,
|
| - ui::DomKey::CHARACTER,
|
| - 0x01}},
|
| + {ui::VKEY_A, ui::DomCode::KEY_A, ui::EF_ALT_DOWN | ui::EF_COMMAND_DOWN,
|
| + ui::DomKey::UNIDENTIFIED},
|
| + {ui::VKEY_A, ui::DomCode::KEY_A, ui::EF_ALT_DOWN | ui::EF_CONTROL_DOWN,
|
| + ui::DomKey::Constant<0x01>::Character}},
|
|
|
| // VKEY_LWIN (left Windows key), Alt modifier.
|
| {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_LWIN,
|
| - ui::DomCode::OS_LEFT,
|
| - ui::EF_COMMAND_DOWN | ui::EF_ALT_DOWN,
|
| - ui::DomKey::OS,
|
| - 0},
|
| - {ui::VKEY_CONTROL,
|
| - ui::DomCode::CONTROL_LEFT,
|
| - ui::EF_CONTROL_DOWN | ui::EF_ALT_DOWN,
|
| - ui::DomKey::CONTROL,
|
| - 0}},
|
| + {ui::VKEY_LWIN, ui::DomCode::OS_LEFT,
|
| + ui::EF_COMMAND_DOWN | ui::EF_ALT_DOWN, ui::DomKey::OS},
|
| + {ui::VKEY_CONTROL, ui::DomCode::CONTROL_LEFT,
|
| + ui::EF_CONTROL_DOWN | ui::EF_ALT_DOWN, ui::DomKey::CONTROL}},
|
|
|
| // VKEY_RWIN (right Windows key), Alt modifier.
|
| {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_RWIN,
|
| - ui::DomCode::OS_RIGHT,
|
| - ui::EF_COMMAND_DOWN | ui::EF_ALT_DOWN,
|
| - ui::DomKey::OS,
|
| - 0},
|
| - {ui::VKEY_CONTROL,
|
| - ui::DomCode::CONTROL_RIGHT,
|
| - ui::EF_CONTROL_DOWN | ui::EF_ALT_DOWN,
|
| - ui::DomKey::CONTROL,
|
| - 0}},
|
| + {ui::VKEY_RWIN, ui::DomCode::OS_RIGHT,
|
| + ui::EF_COMMAND_DOWN | ui::EF_ALT_DOWN, ui::DomKey::OS},
|
| + {ui::VKEY_CONTROL, ui::DomCode::CONTROL_RIGHT,
|
| + ui::EF_CONTROL_DOWN | ui::EF_ALT_DOWN, ui::DomKey::CONTROL}},
|
| };
|
|
|
| for (const auto& test : apple_keyboard_tests) {
|
| @@ -334,16 +270,10 @@ TEST_F(EventRewriterTest, TestRewriteCommandToControlWithControlRemapped) {
|
| KeyTestCase pc_keyboard_tests[] = {
|
| // Control should be remapped to Alt.
|
| {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_CONTROL,
|
| - ui::DomCode::CONTROL_LEFT,
|
| - ui::EF_CONTROL_DOWN,
|
| - ui::DomKey::CONTROL,
|
| - 0},
|
| - {ui::VKEY_MENU,
|
| - ui::DomCode::ALT_LEFT,
|
| - ui::EF_ALT_DOWN,
|
| - ui::DomKey::ALT,
|
| - 0}},
|
| + {ui::VKEY_CONTROL, ui::DomCode::CONTROL_LEFT, ui::EF_CONTROL_DOWN,
|
| + ui::DomKey::CONTROL},
|
| + {ui::VKEY_MENU, ui::DomCode::ALT_LEFT, ui::EF_ALT_DOWN,
|
| + ui::DomKey::ALT}},
|
| };
|
|
|
| for (const auto& test : pc_keyboard_tests) {
|
| @@ -358,30 +288,18 @@ TEST_F(EventRewriterTest, TestRewriteCommandToControlWithControlRemapped) {
|
| // VKEY_LWIN (left Command key) with Alt modifier. The remapped Command
|
| // key should never be re-remapped to Alt.
|
| {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_LWIN,
|
| - ui::DomCode::OS_LEFT,
|
| - ui::EF_COMMAND_DOWN | ui::EF_ALT_DOWN,
|
| - ui::DomKey::OS,
|
| - 0},
|
| - {ui::VKEY_CONTROL,
|
| - ui::DomCode::CONTROL_LEFT,
|
| - ui::EF_CONTROL_DOWN | ui::EF_ALT_DOWN,
|
| - ui::DomKey::CONTROL,
|
| - 0}},
|
| + {ui::VKEY_LWIN, ui::DomCode::OS_LEFT,
|
| + ui::EF_COMMAND_DOWN | ui::EF_ALT_DOWN, ui::DomKey::OS},
|
| + {ui::VKEY_CONTROL, ui::DomCode::CONTROL_LEFT,
|
| + ui::EF_CONTROL_DOWN | ui::EF_ALT_DOWN, ui::DomKey::CONTROL}},
|
|
|
| // VKEY_RWIN (right Command key) with Alt modifier. The remapped Command
|
| // key should never be re-remapped to Alt.
|
| {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_RWIN,
|
| - ui::DomCode::OS_RIGHT,
|
| - ui::EF_COMMAND_DOWN | ui::EF_ALT_DOWN,
|
| - ui::DomKey::OS,
|
| - 0},
|
| - {ui::VKEY_CONTROL,
|
| - ui::DomCode::CONTROL_RIGHT,
|
| - ui::EF_CONTROL_DOWN | ui::EF_ALT_DOWN,
|
| - ui::DomKey::CONTROL,
|
| - 0}},
|
| + {ui::VKEY_RWIN, ui::DomCode::OS_RIGHT,
|
| + ui::EF_COMMAND_DOWN | ui::EF_ALT_DOWN, ui::DomKey::OS},
|
| + {ui::VKEY_CONTROL, ui::DomCode::CONTROL_RIGHT,
|
| + ui::EF_CONTROL_DOWN | ui::EF_ALT_DOWN, ui::DomKey::CONTROL}},
|
| };
|
|
|
| for (const auto& test : apple_keyboard_tests) {
|
| @@ -399,307 +317,166 @@ void EventRewriterTest::TestRewriteNumPadKeys() {
|
| KeyTestCase tests[] = {
|
| // XK_KP_Insert (= NumPad 0 without Num Lock), no modifier.
|
| {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_INSERT,
|
| - ui::DomCode::NUMPAD0,
|
| - ui::EF_NONE,
|
| - ui::DomKey::INSERT,
|
| - 0},
|
| - {ui::VKEY_NUMPAD0,
|
| - ui::DomCode::NUMPAD0,
|
| - ui::EF_NONE,
|
| - ui::DomKey::CHARACTER,
|
| - '0'}},
|
| + {ui::VKEY_INSERT, ui::DomCode::NUMPAD0, ui::EF_NONE, ui::DomKey::INSERT},
|
| + {ui::VKEY_NUMPAD0, ui::DomCode::NUMPAD0, ui::EF_NONE,
|
| + ui::DomKey::Constant<'0'>::Character}},
|
|
|
| // XK_KP_Insert (= NumPad 0 without Num Lock), Alt modifier.
|
| {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_INSERT,
|
| - ui::DomCode::NUMPAD0,
|
| - ui::EF_ALT_DOWN,
|
| - ui::DomKey::INSERT,
|
| - 0},
|
| - {ui::VKEY_NUMPAD0,
|
| - ui::DomCode::NUMPAD0,
|
| - ui::EF_ALT_DOWN,
|
| - ui::DomKey::CHARACTER,
|
| - '0'}},
|
| + {ui::VKEY_INSERT, ui::DomCode::NUMPAD0, ui::EF_ALT_DOWN,
|
| + ui::DomKey::INSERT},
|
| + {ui::VKEY_NUMPAD0, ui::DomCode::NUMPAD0, ui::EF_ALT_DOWN,
|
| + ui::DomKey::Constant<'0'>::Character}},
|
|
|
| // XK_KP_Delete (= NumPad . without Num Lock), Alt modifier.
|
| {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_DELETE,
|
| - ui::DomCode::NUMPAD_DECIMAL,
|
| - ui::EF_ALT_DOWN,
|
| - ui::DomKey::DEL,
|
| - 0x7F},
|
| - {ui::VKEY_DECIMAL,
|
| - ui::DomCode::NUMPAD_DECIMAL,
|
| - ui::EF_ALT_DOWN,
|
| - ui::DomKey::CHARACTER,
|
| - '.'}},
|
| + {ui::VKEY_DELETE, ui::DomCode::NUMPAD_DECIMAL, ui::EF_ALT_DOWN,
|
| + ui::DomKey::DEL},
|
| + {ui::VKEY_DECIMAL, ui::DomCode::NUMPAD_DECIMAL, ui::EF_ALT_DOWN,
|
| + ui::DomKey::Constant<'.'>::Character}},
|
|
|
| // XK_KP_End (= NumPad 1 without Num Lock), Alt modifier.
|
| {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_END,
|
| - ui::DomCode::NUMPAD1,
|
| - ui::EF_ALT_DOWN,
|
| - ui::DomKey::END,
|
| - 0},
|
| - {ui::VKEY_NUMPAD1,
|
| - ui::DomCode::NUMPAD1,
|
| - ui::EF_ALT_DOWN,
|
| - ui::DomKey::CHARACTER,
|
| - '1'}},
|
| + {ui::VKEY_END, ui::DomCode::NUMPAD1, ui::EF_ALT_DOWN, ui::DomKey::END},
|
| + {ui::VKEY_NUMPAD1, ui::DomCode::NUMPAD1, ui::EF_ALT_DOWN,
|
| + ui::DomKey::Constant<'1'>::Character}},
|
|
|
| // XK_KP_Down (= NumPad 2 without Num Lock), Alt modifier.
|
| {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_DOWN,
|
| - ui::DomCode::NUMPAD2,
|
| - ui::EF_ALT_DOWN,
|
| - ui::DomKey::ARROW_DOWN,
|
| - 0},
|
| - {ui::VKEY_NUMPAD2,
|
| - ui::DomCode::NUMPAD2,
|
| - ui::EF_ALT_DOWN,
|
| - ui::DomKey::CHARACTER,
|
| - '2'}},
|
| + {ui::VKEY_DOWN, ui::DomCode::NUMPAD2, ui::EF_ALT_DOWN,
|
| + ui::DomKey::ARROW_DOWN},
|
| + {ui::VKEY_NUMPAD2, ui::DomCode::NUMPAD2, ui::EF_ALT_DOWN,
|
| + ui::DomKey::Constant<'2'>::Character}},
|
|
|
| // XK_KP_Next (= NumPad 3 without Num Lock), Alt modifier.
|
| {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_NEXT,
|
| - ui::DomCode::NUMPAD3,
|
| - ui::EF_ALT_DOWN,
|
| - ui::DomKey::PAGE_DOWN,
|
| - 0},
|
| - {ui::VKEY_NUMPAD3,
|
| - ui::DomCode::NUMPAD3,
|
| - ui::EF_ALT_DOWN,
|
| - ui::DomKey::CHARACTER,
|
| - '3'}},
|
| + {ui::VKEY_NEXT, ui::DomCode::NUMPAD3, ui::EF_ALT_DOWN,
|
| + ui::DomKey::PAGE_DOWN},
|
| + {ui::VKEY_NUMPAD3, ui::DomCode::NUMPAD3, ui::EF_ALT_DOWN,
|
| + ui::DomKey::Constant<'3'>::Character}},
|
|
|
| // XK_KP_Left (= NumPad 4 without Num Lock), Alt modifier.
|
| {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_LEFT,
|
| - ui::DomCode::NUMPAD4,
|
| - ui::EF_ALT_DOWN,
|
| - ui::DomKey::ARROW_LEFT,
|
| - 0},
|
| - {ui::VKEY_NUMPAD4,
|
| - ui::DomCode::NUMPAD4,
|
| - ui::EF_ALT_DOWN,
|
| - ui::DomKey::CHARACTER,
|
| - '4'}},
|
| + {ui::VKEY_LEFT, ui::DomCode::NUMPAD4, ui::EF_ALT_DOWN,
|
| + ui::DomKey::ARROW_LEFT},
|
| + {ui::VKEY_NUMPAD4, ui::DomCode::NUMPAD4, ui::EF_ALT_DOWN,
|
| + ui::DomKey::Constant<'4'>::Character}},
|
|
|
| // XK_KP_Begin (= NumPad 5 without Num Lock), Alt modifier.
|
| {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_CLEAR,
|
| - ui::DomCode::NUMPAD5,
|
| - ui::EF_ALT_DOWN,
|
| - ui::DomKey::CLEAR,
|
| - 0},
|
| - {ui::VKEY_NUMPAD5,
|
| - ui::DomCode::NUMPAD5,
|
| - ui::EF_ALT_DOWN,
|
| - ui::DomKey::CHARACTER,
|
| - '5'}},
|
| + {ui::VKEY_CLEAR, ui::DomCode::NUMPAD5, ui::EF_ALT_DOWN,
|
| + ui::DomKey::CLEAR},
|
| + {ui::VKEY_NUMPAD5, ui::DomCode::NUMPAD5, ui::EF_ALT_DOWN,
|
| + ui::DomKey::Constant<'5'>::Character}},
|
|
|
| // XK_KP_Right (= NumPad 6 without Num Lock), Alt modifier.
|
| {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_RIGHT,
|
| - ui::DomCode::NUMPAD6,
|
| - ui::EF_ALT_DOWN,
|
| - ui::DomKey::ARROW_RIGHT,
|
| - 0},
|
| - {ui::VKEY_NUMPAD6,
|
| - ui::DomCode::NUMPAD6,
|
| - ui::EF_ALT_DOWN,
|
| - ui::DomKey::CHARACTER,
|
| - '6'}},
|
| + {ui::VKEY_RIGHT, ui::DomCode::NUMPAD6, ui::EF_ALT_DOWN,
|
| + ui::DomKey::ARROW_RIGHT},
|
| + {ui::VKEY_NUMPAD6, ui::DomCode::NUMPAD6, ui::EF_ALT_DOWN,
|
| + ui::DomKey::Constant<'6'>::Character}},
|
|
|
| // XK_KP_Home (= NumPad 7 without Num Lock), Alt modifier.
|
| {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_HOME,
|
| - ui::DomCode::NUMPAD7,
|
| - ui::EF_ALT_DOWN,
|
| - ui::DomKey::HOME,
|
| - 0},
|
| - {ui::VKEY_NUMPAD7,
|
| - ui::DomCode::NUMPAD7,
|
| - ui::EF_ALT_DOWN,
|
| - ui::DomKey::CHARACTER,
|
| - '7'}},
|
| + {ui::VKEY_HOME, ui::DomCode::NUMPAD7, ui::EF_ALT_DOWN, ui::DomKey::HOME},
|
| + {ui::VKEY_NUMPAD7, ui::DomCode::NUMPAD7, ui::EF_ALT_DOWN,
|
| + ui::DomKey::Constant<'7'>::Character}},
|
|
|
| // XK_KP_Up (= NumPad 8 without Num Lock), Alt modifier.
|
| {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_UP,
|
| - ui::DomCode::NUMPAD8,
|
| - ui::EF_ALT_DOWN,
|
| - ui::DomKey::ARROW_UP,
|
| - 0},
|
| - {ui::VKEY_NUMPAD8,
|
| - ui::DomCode::NUMPAD8,
|
| - ui::EF_ALT_DOWN,
|
| - ui::DomKey::CHARACTER,
|
| - '8'}},
|
| + {ui::VKEY_UP, ui::DomCode::NUMPAD8, ui::EF_ALT_DOWN,
|
| + ui::DomKey::ARROW_UP},
|
| + {ui::VKEY_NUMPAD8, ui::DomCode::NUMPAD8, ui::EF_ALT_DOWN,
|
| + ui::DomKey::Constant<'8'>::Character}},
|
|
|
| // XK_KP_Prior (= NumPad 9 without Num Lock), Alt modifier.
|
| {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_PRIOR,
|
| - ui::DomCode::NUMPAD9,
|
| - ui::EF_ALT_DOWN,
|
| - ui::DomKey::PAGE_UP,
|
| - 0},
|
| - {ui::VKEY_NUMPAD9,
|
| - ui::DomCode::NUMPAD9,
|
| - ui::EF_ALT_DOWN,
|
| - ui::DomKey::CHARACTER,
|
| - '9'}},
|
| + {ui::VKEY_PRIOR, ui::DomCode::NUMPAD9, ui::EF_ALT_DOWN,
|
| + ui::DomKey::PAGE_UP},
|
| + {ui::VKEY_NUMPAD9, ui::DomCode::NUMPAD9, ui::EF_ALT_DOWN,
|
| + ui::DomKey::Constant<'9'>::Character}},
|
|
|
| // XK_KP_0 (= NumPad 0 with Num Lock), Num Lock modifier.
|
| {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_NUMPAD0,
|
| - ui::DomCode::NUMPAD0,
|
| - ui::EF_NONE,
|
| - ui::DomKey::CHARACTER,
|
| - '0'},
|
| - {ui::VKEY_NUMPAD0,
|
| - ui::DomCode::NUMPAD0,
|
| - ui::EF_NONE,
|
| - ui::DomKey::CHARACTER,
|
| - '0'}},
|
| + {ui::VKEY_NUMPAD0, ui::DomCode::NUMPAD0, ui::EF_NONE,
|
| + ui::DomKey::Constant<'0'>::Character},
|
| + {ui::VKEY_NUMPAD0, ui::DomCode::NUMPAD0, ui::EF_NONE,
|
| + ui::DomKey::Constant<'0'>::Character}},
|
|
|
| // XK_KP_DECIMAL (= NumPad . with Num Lock), Num Lock modifier.
|
| {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_DECIMAL,
|
| - ui::DomCode::NUMPAD_DECIMAL,
|
| - ui::EF_NONE,
|
| - ui::DomKey::CHARACTER,
|
| - '.'},
|
| - {ui::VKEY_DECIMAL,
|
| - ui::DomCode::NUMPAD_DECIMAL,
|
| - ui::EF_NONE,
|
| - ui::DomKey::CHARACTER,
|
| - '.'}},
|
| + {ui::VKEY_DECIMAL, ui::DomCode::NUMPAD_DECIMAL, ui::EF_NONE,
|
| + ui::DomKey::Constant<'.'>::Character},
|
| + {ui::VKEY_DECIMAL, ui::DomCode::NUMPAD_DECIMAL, ui::EF_NONE,
|
| + ui::DomKey::Constant<'.'>::Character}},
|
|
|
| // XK_KP_1 (= NumPad 1 with Num Lock), Num Lock modifier.
|
| {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_NUMPAD1,
|
| - ui::DomCode::NUMPAD1,
|
| - ui::EF_NONE,
|
| - ui::DomKey::CHARACTER,
|
| - '1'},
|
| - {ui::VKEY_NUMPAD1,
|
| - ui::DomCode::NUMPAD1,
|
| - ui::EF_NONE,
|
| - ui::DomKey::CHARACTER,
|
| - '1'}},
|
| + {ui::VKEY_NUMPAD1, ui::DomCode::NUMPAD1, ui::EF_NONE,
|
| + ui::DomKey::Constant<'1'>::Character},
|
| + {ui::VKEY_NUMPAD1, ui::DomCode::NUMPAD1, ui::EF_NONE,
|
| + ui::DomKey::Constant<'1'>::Character}},
|
|
|
| // XK_KP_2 (= NumPad 2 with Num Lock), Num Lock modifier.
|
| {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_NUMPAD2,
|
| - ui::DomCode::NUMPAD2,
|
| - ui::EF_NONE,
|
| - ui::DomKey::CHARACTER,
|
| - '2'},
|
| - {ui::VKEY_NUMPAD2,
|
| - ui::DomCode::NUMPAD2,
|
| - ui::EF_NONE,
|
| - ui::DomKey::CHARACTER,
|
| - '2'}},
|
| + {ui::VKEY_NUMPAD2, ui::DomCode::NUMPAD2, ui::EF_NONE,
|
| + ui::DomKey::Constant<'2'>::Character},
|
| + {ui::VKEY_NUMPAD2, ui::DomCode::NUMPAD2, ui::EF_NONE,
|
| + ui::DomKey::Constant<'2'>::Character}},
|
|
|
| // XK_KP_3 (= NumPad 3 with Num Lock), Num Lock modifier.
|
| {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_NUMPAD3,
|
| - ui::DomCode::NUMPAD3,
|
| - ui::EF_NONE,
|
| - ui::DomKey::CHARACTER,
|
| - '3'},
|
| - {ui::VKEY_NUMPAD3,
|
| - ui::DomCode::NUMPAD3,
|
| - ui::EF_NONE,
|
| - ui::DomKey::CHARACTER,
|
| - '3'}},
|
| + {ui::VKEY_NUMPAD3, ui::DomCode::NUMPAD3, ui::EF_NONE,
|
| + ui::DomKey::Constant<'3'>::Character},
|
| + {ui::VKEY_NUMPAD3, ui::DomCode::NUMPAD3, ui::EF_NONE,
|
| + ui::DomKey::Constant<'3'>::Character}},
|
|
|
| // XK_KP_4 (= NumPad 4 with Num Lock), Num Lock modifier.
|
| {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_NUMPAD4,
|
| - ui::DomCode::NUMPAD4,
|
| - ui::EF_NONE,
|
| - ui::DomKey::CHARACTER,
|
| - '4'},
|
| - {ui::VKEY_NUMPAD4,
|
| - ui::DomCode::NUMPAD4,
|
| - ui::EF_NONE,
|
| - ui::DomKey::CHARACTER,
|
| - '4'}},
|
| + {ui::VKEY_NUMPAD4, ui::DomCode::NUMPAD4, ui::EF_NONE,
|
| + ui::DomKey::Constant<'4'>::Character},
|
| + {ui::VKEY_NUMPAD4, ui::DomCode::NUMPAD4, ui::EF_NONE,
|
| + ui::DomKey::Constant<'4'>::Character}},
|
|
|
| // XK_KP_5 (= NumPad 5 with Num Lock), Num Lock
|
| // modifier.
|
| {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_NUMPAD5,
|
| - ui::DomCode::NUMPAD5,
|
| - ui::EF_NONE,
|
| - ui::DomKey::CHARACTER,
|
| - '5'},
|
| - {ui::VKEY_NUMPAD5,
|
| - ui::DomCode::NUMPAD5,
|
| - ui::EF_NONE,
|
| - ui::DomKey::CHARACTER,
|
| - '5'}},
|
| + {ui::VKEY_NUMPAD5, ui::DomCode::NUMPAD5, ui::EF_NONE,
|
| + ui::DomKey::Constant<'5'>::Character},
|
| + {ui::VKEY_NUMPAD5, ui::DomCode::NUMPAD5, ui::EF_NONE,
|
| + ui::DomKey::Constant<'5'>::Character}},
|
|
|
| // XK_KP_6 (= NumPad 6 with Num Lock), Num Lock
|
| // modifier.
|
| {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_NUMPAD6,
|
| - ui::DomCode::NUMPAD6,
|
| - ui::EF_NONE,
|
| - ui::DomKey::CHARACTER,
|
| - '6'},
|
| - {ui::VKEY_NUMPAD6,
|
| - ui::DomCode::NUMPAD6,
|
| - ui::EF_NONE,
|
| - ui::DomKey::CHARACTER,
|
| - '6'}},
|
| + {ui::VKEY_NUMPAD6, ui::DomCode::NUMPAD6, ui::EF_NONE,
|
| + ui::DomKey::Constant<'6'>::Character},
|
| + {ui::VKEY_NUMPAD6, ui::DomCode::NUMPAD6, ui::EF_NONE,
|
| + ui::DomKey::Constant<'6'>::Character}},
|
|
|
| // XK_KP_7 (= NumPad 7 with Num Lock), Num Lock
|
| // modifier.
|
| {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_NUMPAD7,
|
| - ui::DomCode::NUMPAD7,
|
| - ui::EF_NONE,
|
| - ui::DomKey::CHARACTER,
|
| - '7'},
|
| - {ui::VKEY_NUMPAD7,
|
| - ui::DomCode::NUMPAD7,
|
| - ui::EF_NONE,
|
| - ui::DomKey::CHARACTER,
|
| - '7'}},
|
| + {ui::VKEY_NUMPAD7, ui::DomCode::NUMPAD7, ui::EF_NONE,
|
| + ui::DomKey::Constant<'7'>::Character},
|
| + {ui::VKEY_NUMPAD7, ui::DomCode::NUMPAD7, ui::EF_NONE,
|
| + ui::DomKey::Constant<'7'>::Character}},
|
|
|
| // XK_KP_8 (= NumPad 8 with Num Lock), Num Lock
|
| // modifier.
|
| {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_NUMPAD8,
|
| - ui::DomCode::NUMPAD8,
|
| - ui::EF_NONE,
|
| - ui::DomKey::CHARACTER,
|
| - '8'},
|
| - {ui::VKEY_NUMPAD8,
|
| - ui::DomCode::NUMPAD8,
|
| - ui::EF_NONE,
|
| - ui::DomKey::CHARACTER,
|
| - '8'}},
|
| + {ui::VKEY_NUMPAD8, ui::DomCode::NUMPAD8, ui::EF_NONE,
|
| + ui::DomKey::Constant<'8'>::Character},
|
| + {ui::VKEY_NUMPAD8, ui::DomCode::NUMPAD8, ui::EF_NONE,
|
| + ui::DomKey::Constant<'8'>::Character}},
|
|
|
| // XK_KP_9 (= NumPad 9 with Num Lock), Num Lock
|
| // modifier.
|
| {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_NUMPAD9,
|
| - ui::DomCode::NUMPAD9,
|
| - ui::EF_NONE,
|
| - ui::DomKey::CHARACTER,
|
| - '9'},
|
| - {ui::VKEY_NUMPAD9,
|
| - ui::DomCode::NUMPAD9,
|
| - ui::EF_NONE,
|
| - ui::DomKey::CHARACTER,
|
| - '9'}},
|
| + {ui::VKEY_NUMPAD9, ui::DomCode::NUMPAD9, ui::EF_NONE,
|
| + ui::DomKey::Constant<'9'>::Character},
|
| + {ui::VKEY_NUMPAD9, ui::DomCode::NUMPAD9, ui::EF_NONE,
|
| + ui::DomKey::Constant<'9'>::Character}},
|
| };
|
|
|
| for (const auto& test : tests) {
|
| @@ -733,31 +510,19 @@ void EventRewriterTest::TestRewriteNumPadKeysOnAppleKeyboard() {
|
| // XK_KP_End (= NumPad 1 without Num Lock), Win modifier.
|
| // The result should be "Num Pad 1 with Control + Num Lock modifiers".
|
| {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_END,
|
| - ui::DomCode::NUMPAD1,
|
| - ui::EF_COMMAND_DOWN,
|
| - ui::DomKey::END,
|
| - 0},
|
| - {ui::VKEY_NUMPAD1,
|
| - ui::DomCode::NUMPAD1,
|
| - ui::EF_CONTROL_DOWN,
|
| - ui::DomKey::UNIDENTIFIED,
|
| - 0}},
|
| + {ui::VKEY_END, ui::DomCode::NUMPAD1, ui::EF_COMMAND_DOWN,
|
| + ui::DomKey::END},
|
| + {ui::VKEY_NUMPAD1, ui::DomCode::NUMPAD1, ui::EF_CONTROL_DOWN,
|
| + ui::DomKey::UNIDENTIFIED}},
|
|
|
| // XK_KP_1 (= NumPad 1 with Num Lock), Win modifier.
|
| // The result should also be "Num Pad 1 with Control + Num Lock
|
| // modifiers".
|
| {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_NUMPAD1,
|
| - ui::DomCode::NUMPAD1,
|
| - ui::EF_COMMAND_DOWN,
|
| - ui::DomKey::CHARACTER,
|
| - '1'},
|
| - {ui::VKEY_NUMPAD1,
|
| - ui::DomCode::NUMPAD1,
|
| - ui::EF_CONTROL_DOWN,
|
| - ui::DomKey::UNIDENTIFIED,
|
| - 0}}};
|
| + {ui::VKEY_NUMPAD1, ui::DomCode::NUMPAD1, ui::EF_COMMAND_DOWN,
|
| + ui::DomKey::Constant<'1'>::Character},
|
| + {ui::VKEY_NUMPAD1, ui::DomCode::NUMPAD1, ui::EF_CONTROL_DOWN,
|
| + ui::DomKey::UNIDENTIFIED}}};
|
|
|
| for (const auto& test : tests) {
|
| CheckKeyTestCase(&rewriter, test);
|
| @@ -788,70 +553,41 @@ TEST_F(EventRewriterTest, TestRewriteModifiersNoRemap) {
|
| KeyTestCase tests[] = {
|
| // Press Search. Confirm the event is not rewritten.
|
| {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_LWIN, ui::DomCode::OS_LEFT, ui::EF_NONE, ui::DomKey::OS, 0},
|
| - {ui::VKEY_LWIN,
|
| - ui::DomCode::OS_LEFT,
|
| - ui::EF_COMMAND_DOWN,
|
| - ui::DomKey::OS,
|
| - 0}},
|
| + {ui::VKEY_LWIN, ui::DomCode::OS_LEFT, ui::EF_NONE, ui::DomKey::OS},
|
| + {ui::VKEY_LWIN, ui::DomCode::OS_LEFT, ui::EF_COMMAND_DOWN,
|
| + ui::DomKey::OS}},
|
|
|
| // Press left Control. Confirm the event is not rewritten.
|
| {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_CONTROL,
|
| - ui::DomCode::CONTROL_LEFT,
|
| - ui::EF_CONTROL_DOWN,
|
| - ui::DomKey::CONTROL,
|
| - 0},
|
| - {ui::VKEY_CONTROL,
|
| - ui::DomCode::CONTROL_LEFT,
|
| - ui::EF_CONTROL_DOWN,
|
| - ui::DomKey::CONTROL,
|
| - 0}},
|
| + {ui::VKEY_CONTROL, ui::DomCode::CONTROL_LEFT, ui::EF_CONTROL_DOWN,
|
| + ui::DomKey::CONTROL},
|
| + {ui::VKEY_CONTROL, ui::DomCode::CONTROL_LEFT, ui::EF_CONTROL_DOWN,
|
| + ui::DomKey::CONTROL}},
|
|
|
| // Press right Control. Confirm the event is not rewritten.
|
| {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_CONTROL,
|
| - ui::DomCode::CONTROL_LEFT,
|
| - ui::EF_CONTROL_DOWN,
|
| - ui::DomKey::CONTROL,
|
| - 0},
|
| - {ui::VKEY_CONTROL,
|
| - ui::DomCode::CONTROL_LEFT,
|
| - ui::EF_CONTROL_DOWN,
|
| - ui::DomKey::CONTROL,
|
| - 0}},
|
| + {ui::VKEY_CONTROL, ui::DomCode::CONTROL_LEFT, ui::EF_CONTROL_DOWN,
|
| + ui::DomKey::CONTROL},
|
| + {ui::VKEY_CONTROL, ui::DomCode::CONTROL_LEFT, ui::EF_CONTROL_DOWN,
|
| + ui::DomKey::CONTROL}},
|
|
|
| // Press left Alt. Confirm the event is not rewritten.
|
| {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_MENU,
|
| - ui::DomCode::ALT_LEFT,
|
| - ui::EF_ALT_DOWN,
|
| - ui::DomKey::ALT,
|
| - 0},
|
| - {ui::VKEY_MENU,
|
| - ui::DomCode::ALT_LEFT,
|
| - ui::EF_ALT_DOWN,
|
| - ui::DomKey::ALT,
|
| - 0}},
|
| + {ui::VKEY_MENU, ui::DomCode::ALT_LEFT, ui::EF_ALT_DOWN, ui::DomKey::ALT},
|
| + {ui::VKEY_MENU, ui::DomCode::ALT_LEFT, ui::EF_ALT_DOWN,
|
| + ui::DomKey::ALT}},
|
|
|
| // Press right Alt. Confirm the event is not rewritten.
|
| {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_MENU,
|
| - ui::DomCode::ALT_LEFT,
|
| - ui::EF_ALT_DOWN,
|
| - ui::DomKey::ALT,
|
| - 0},
|
| - {ui::VKEY_MENU,
|
| - ui::DomCode::ALT_LEFT,
|
| - ui::EF_ALT_DOWN,
|
| - ui::DomKey::ALT,
|
| - 0}},
|
| + {ui::VKEY_MENU, ui::DomCode::ALT_LEFT, ui::EF_ALT_DOWN, ui::DomKey::ALT},
|
| + {ui::VKEY_MENU, ui::DomCode::ALT_LEFT, ui::EF_ALT_DOWN,
|
| + ui::DomKey::ALT}},
|
|
|
| // Test KeyRelease event, just in case.
|
| // Release Search. Confirm the release event is not rewritten.
|
| {ui::ET_KEY_RELEASED,
|
| - {ui::VKEY_LWIN, ui::DomCode::OS_LEFT, ui::EF_NONE, ui::DomKey::OS, 0},
|
| - {ui::VKEY_LWIN, ui::DomCode::OS_LEFT, ui::EF_NONE, ui::DomKey::OS, 0}},
|
| + {ui::VKEY_LWIN, ui::DomCode::OS_LEFT, ui::EF_NONE, ui::DomKey::OS},
|
| + {ui::VKEY_LWIN, ui::DomCode::OS_LEFT, ui::EF_NONE, ui::DomKey::OS}},
|
| };
|
|
|
| for (const auto& test : tests) {
|
| @@ -868,57 +604,35 @@ TEST_F(EventRewriterTest, TestRewriteModifiersNoRemapMultipleKeys) {
|
| KeyTestCase tests[] = {
|
| // Press Alt with Shift. Confirm the event is not rewritten.
|
| {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_MENU,
|
| - ui::DomCode::ALT_LEFT,
|
| - ui::EF_SHIFT_DOWN | ui::EF_ALT_DOWN,
|
| - ui::DomKey::ALT,
|
| - 0},
|
| - {ui::VKEY_MENU,
|
| - ui::DomCode::ALT_LEFT,
|
| - ui::EF_SHIFT_DOWN | ui::EF_ALT_DOWN,
|
| - ui::DomKey::ALT,
|
| - 0}},
|
| + {ui::VKEY_MENU, ui::DomCode::ALT_LEFT,
|
| + ui::EF_SHIFT_DOWN | ui::EF_ALT_DOWN, ui::DomKey::ALT},
|
| + {ui::VKEY_MENU, ui::DomCode::ALT_LEFT,
|
| + ui::EF_SHIFT_DOWN | ui::EF_ALT_DOWN, ui::DomKey::ALT}},
|
|
|
| // Press Search with Caps Lock mask. Confirm the event is not rewritten.
|
| {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_LWIN,
|
| - ui::DomCode::OS_LEFT,
|
| - ui::EF_CAPS_LOCK_DOWN | ui::EF_COMMAND_DOWN,
|
| - ui::DomKey::OS,
|
| - 0},
|
| - {ui::VKEY_LWIN,
|
| - ui::DomCode::OS_LEFT,
|
| - ui::EF_CAPS_LOCK_DOWN | ui::EF_COMMAND_DOWN,
|
| - ui::DomKey::OS,
|
| - 0}},
|
| + {ui::VKEY_LWIN, ui::DomCode::OS_LEFT,
|
| + ui::EF_CAPS_LOCK_DOWN | ui::EF_COMMAND_DOWN, ui::DomKey::OS},
|
| + {ui::VKEY_LWIN, ui::DomCode::OS_LEFT,
|
| + ui::EF_CAPS_LOCK_DOWN | ui::EF_COMMAND_DOWN, ui::DomKey::OS}},
|
|
|
| // Release Search with Caps Lock mask. Confirm the event is not rewritten.
|
| {ui::ET_KEY_RELEASED,
|
| - {ui::VKEY_LWIN,
|
| - ui::DomCode::OS_LEFT,
|
| - ui::EF_CAPS_LOCK_DOWN,
|
| - ui::DomKey::OS,
|
| - 0},
|
| - {ui::VKEY_LWIN,
|
| - ui::DomCode::OS_LEFT,
|
| - ui::EF_CAPS_LOCK_DOWN,
|
| - ui::DomKey::OS,
|
| - 0}},
|
| + {ui::VKEY_LWIN, ui::DomCode::OS_LEFT, ui::EF_CAPS_LOCK_DOWN,
|
| + ui::DomKey::OS},
|
| + {ui::VKEY_LWIN, ui::DomCode::OS_LEFT, ui::EF_CAPS_LOCK_DOWN,
|
| + ui::DomKey::OS}},
|
|
|
| // Press Shift+Ctrl+Alt+Search+A. Confirm the event is not rewritten.
|
| {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_B,
|
| - ui::DomCode::KEY_B,
|
| + {ui::VKEY_B, ui::DomCode::KEY_B,
|
| ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN | ui::EF_ALT_DOWN |
|
| ui::EF_COMMAND_DOWN,
|
| - ui::DomKey::CHARACTER,
|
| - 'B'},
|
| - {ui::VKEY_B,
|
| - ui::DomCode::KEY_B,
|
| + ui::DomKey::Constant<'B'>::Character},
|
| + {ui::VKEY_B, ui::DomCode::KEY_B,
|
| ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN | ui::EF_ALT_DOWN |
|
| ui::EF_COMMAND_DOWN,
|
| - ui::DomKey::CHARACTER,
|
| - 'B'}},
|
| + ui::DomKey::Constant<'B'>::Character}},
|
| };
|
|
|
| for (const auto& test : tests) {
|
| @@ -945,80 +659,47 @@ TEST_F(EventRewriterTest, TestRewriteModifiersDisableSome) {
|
| // Press Alt with Shift. This key press shouldn't be affected by the
|
| // pref. Confirm the event is not rewritten.
|
| {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_MENU,
|
| - ui::DomCode::ALT_LEFT,
|
| - ui::EF_SHIFT_DOWN | ui::EF_ALT_DOWN,
|
| - ui::DomKey::ALT,
|
| - 0},
|
| - {ui::VKEY_MENU,
|
| - ui::DomCode::ALT_LEFT,
|
| - ui::EF_SHIFT_DOWN | ui::EF_ALT_DOWN,
|
| - ui::DomKey::ALT,
|
| - 0}},
|
| + {ui::VKEY_MENU, ui::DomCode::ALT_LEFT,
|
| + ui::EF_SHIFT_DOWN | ui::EF_ALT_DOWN, ui::DomKey::ALT},
|
| + {ui::VKEY_MENU, ui::DomCode::ALT_LEFT,
|
| + ui::EF_SHIFT_DOWN | ui::EF_ALT_DOWN, ui::DomKey::ALT}},
|
|
|
| // Press Search. Confirm the event is now VKEY_UNKNOWN.
|
| {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_LWIN, ui::DomCode::OS_LEFT, ui::EF_NONE, ui::DomKey::OS, 0},
|
| - {ui::VKEY_UNKNOWN,
|
| - ui::DomCode::NONE,
|
| - ui::EF_NONE,
|
| - ui::DomKey::UNIDENTIFIED,
|
| - 0}},
|
| + {ui::VKEY_LWIN, ui::DomCode::OS_LEFT, ui::EF_NONE, ui::DomKey::OS},
|
| + {ui::VKEY_UNKNOWN, ui::DomCode::NONE, ui::EF_NONE,
|
| + ui::DomKey::UNIDENTIFIED}},
|
|
|
| // Press Control. Confirm the event is now VKEY_UNKNOWN.
|
| {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_CONTROL,
|
| - ui::DomCode::CONTROL_LEFT,
|
| - ui::EF_CONTROL_DOWN,
|
| - ui::DomKey::CONTROL,
|
| - 0},
|
| - {ui::VKEY_UNKNOWN,
|
| - ui::DomCode::NONE,
|
| - ui::EF_NONE,
|
| - ui::DomKey::UNIDENTIFIED,
|
| - 0}},
|
| + {ui::VKEY_CONTROL, ui::DomCode::CONTROL_LEFT, ui::EF_CONTROL_DOWN,
|
| + ui::DomKey::CONTROL},
|
| + {ui::VKEY_UNKNOWN, ui::DomCode::NONE, ui::EF_NONE,
|
| + ui::DomKey::UNIDENTIFIED}},
|
|
|
| // Press Control+Search. Confirm the event is now VKEY_UNKNOWN
|
| // without any modifiers.
|
| {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_LWIN,
|
| - ui::DomCode::OS_LEFT,
|
| - ui::EF_CONTROL_DOWN,
|
| - ui::DomKey::OS,
|
| - 0},
|
| - {ui::VKEY_UNKNOWN,
|
| - ui::DomCode::NONE,
|
| - ui::EF_NONE,
|
| - ui::DomKey::UNIDENTIFIED,
|
| - 0}},
|
| + {ui::VKEY_LWIN, ui::DomCode::OS_LEFT, ui::EF_CONTROL_DOWN,
|
| + ui::DomKey::OS},
|
| + {ui::VKEY_UNKNOWN, ui::DomCode::NONE, ui::EF_NONE,
|
| + ui::DomKey::UNIDENTIFIED}},
|
|
|
| // Press Control+Search+a. Confirm the event is now VKEY_A without any
|
| // modifiers.
|
| {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_A,
|
| - ui::DomCode::KEY_A,
|
| - ui::EF_CONTROL_DOWN,
|
| - ui::DomKey::CHARACTER,
|
| - 'a'},
|
| - {ui::VKEY_A,
|
| - ui::DomCode::KEY_A,
|
| - ui::EF_NONE,
|
| - ui::DomKey::CHARACTER,
|
| - 'a'}},
|
| + {ui::VKEY_A, ui::DomCode::KEY_A, ui::EF_CONTROL_DOWN,
|
| + ui::DomKey::Constant<'a'>::Character},
|
| + {ui::VKEY_A, ui::DomCode::KEY_A, ui::EF_NONE,
|
| + ui::DomKey::Constant<'a'>::Character}},
|
|
|
| // Press Control+Search+Alt+a. Confirm the event is now VKEY_A only with
|
| // the Alt modifier.
|
| {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_A,
|
| - ui::DomCode::KEY_A,
|
| - ui::EF_CONTROL_DOWN | ui::EF_ALT_DOWN,
|
| - ui::DomKey::CHARACTER,
|
| - 'a'},
|
| - {ui::VKEY_A,
|
| - ui::DomCode::KEY_A,
|
| - ui::EF_ALT_DOWN,
|
| - ui::DomKey::CHARACTER,
|
| - 'a'}},
|
| + {ui::VKEY_A, ui::DomCode::KEY_A, ui::EF_CONTROL_DOWN | ui::EF_ALT_DOWN,
|
| + ui::DomKey::Constant<'a'>::Character},
|
| + {ui::VKEY_A, ui::DomCode::KEY_A, ui::EF_ALT_DOWN,
|
| + ui::DomKey::Constant<'a'>::Character}},
|
| };
|
|
|
| for (const auto& test : disabled_modifier_tests) {
|
| @@ -1034,30 +715,17 @@ TEST_F(EventRewriterTest, TestRewriteModifiersDisableSome) {
|
| // Press left Alt. Confirm the event is now VKEY_CONTROL
|
| // even though the Control key itself is disabled.
|
| {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_MENU,
|
| - ui::DomCode::ALT_LEFT,
|
| - ui::EF_ALT_DOWN,
|
| - ui::DomKey::ALT,
|
| - 0},
|
| - {ui::VKEY_CONTROL,
|
| - ui::DomCode::CONTROL_LEFT,
|
| - ui::EF_CONTROL_DOWN,
|
| - ui::DomKey::CONTROL,
|
| - 0}},
|
| + {ui::VKEY_MENU, ui::DomCode::ALT_LEFT, ui::EF_ALT_DOWN, ui::DomKey::ALT},
|
| + {ui::VKEY_CONTROL, ui::DomCode::CONTROL_LEFT, ui::EF_CONTROL_DOWN,
|
| + ui::DomKey::CONTROL}},
|
|
|
| // Press Alt+a. Confirm the event is now Control+a even though the Control
|
| // key itself is disabled.
|
| {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_A,
|
| - ui::DomCode::KEY_A,
|
| - ui::EF_ALT_DOWN,
|
| - ui::DomKey::CHARACTER,
|
| - 'a'},
|
| - {ui::VKEY_A,
|
| - ui::DomCode::KEY_A,
|
| - ui::EF_CONTROL_DOWN,
|
| - ui::DomKey::CHARACTER,
|
| - 0x01}},
|
| + {ui::VKEY_A, ui::DomCode::KEY_A, ui::EF_ALT_DOWN,
|
| + ui::DomKey::Constant<'a'>::Character},
|
| + {ui::VKEY_A, ui::DomCode::KEY_A, ui::EF_CONTROL_DOWN,
|
| + ui::DomKey::Constant<0x01>::Character}},
|
| };
|
|
|
| for (const auto& test : tests) {
|
| @@ -1080,16 +748,10 @@ TEST_F(EventRewriterTest, TestRewriteModifiersRemapToControl) {
|
| KeyTestCase s_tests[] = {
|
| // Press Search. Confirm the event is now VKEY_CONTROL.
|
| {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_LWIN,
|
| - ui::DomCode::OS_LEFT,
|
| - ui::EF_COMMAND_DOWN,
|
| - ui::DomKey::OS,
|
| - 0},
|
| - {ui::VKEY_CONTROL,
|
| - ui::DomCode::CONTROL_LEFT,
|
| - ui::EF_CONTROL_DOWN,
|
| - ui::DomKey::CONTROL,
|
| - 0}},
|
| + {ui::VKEY_LWIN, ui::DomCode::OS_LEFT, ui::EF_COMMAND_DOWN,
|
| + ui::DomKey::OS},
|
| + {ui::VKEY_CONTROL, ui::DomCode::CONTROL_LEFT, ui::EF_CONTROL_DOWN,
|
| + ui::DomKey::CONTROL}},
|
| };
|
|
|
| for (const auto& test : s_tests) {
|
| @@ -1104,72 +766,44 @@ TEST_F(EventRewriterTest, TestRewriteModifiersRemapToControl) {
|
| KeyTestCase sa_tests[] = {
|
| // Press Alt. Confirm the event is now VKEY_CONTROL.
|
| {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_MENU,
|
| - ui::DomCode::ALT_LEFT,
|
| - ui::EF_ALT_DOWN,
|
| - ui::DomKey::ALT,
|
| - 0},
|
| - {ui::VKEY_CONTROL,
|
| - ui::DomCode::CONTROL_LEFT,
|
| - ui::EF_CONTROL_DOWN,
|
| - ui::DomKey::CONTROL,
|
| - 0}},
|
| + {ui::VKEY_MENU, ui::DomCode::ALT_LEFT, ui::EF_ALT_DOWN, ui::DomKey::ALT},
|
| + {ui::VKEY_CONTROL, ui::DomCode::CONTROL_LEFT, ui::EF_CONTROL_DOWN,
|
| + ui::DomKey::CONTROL}},
|
|
|
| // Press Alt+Search. Confirm the event is now VKEY_CONTROL.
|
| {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_LWIN,
|
| - ui::DomCode::OS_LEFT,
|
| - ui::EF_ALT_DOWN | ui::EF_COMMAND_DOWN,
|
| - ui::DomKey::OS,
|
| - 0},
|
| - {ui::VKEY_CONTROL,
|
| - ui::DomCode::CONTROL_LEFT,
|
| - ui::EF_CONTROL_DOWN,
|
| - ui::DomKey::CONTROL,
|
| - 0}},
|
| + {ui::VKEY_LWIN, ui::DomCode::OS_LEFT,
|
| + ui::EF_ALT_DOWN | ui::EF_COMMAND_DOWN, ui::DomKey::OS},
|
| + {ui::VKEY_CONTROL, ui::DomCode::CONTROL_LEFT, ui::EF_CONTROL_DOWN,
|
| + ui::DomKey::CONTROL}},
|
|
|
| // Press Control+Alt+Search. Confirm the event is now VKEY_CONTROL.
|
| {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_LWIN,
|
| - ui::DomCode::OS_LEFT,
|
| + {ui::VKEY_LWIN, ui::DomCode::OS_LEFT,
|
| ui::EF_CONTROL_DOWN | ui::EF_ALT_DOWN | ui::EF_COMMAND_DOWN,
|
| - ui::DomKey::OS,
|
| - 0},
|
| - {ui::VKEY_CONTROL,
|
| - ui::DomCode::CONTROL_LEFT,
|
| - ui::EF_CONTROL_DOWN,
|
| - ui::DomKey::CONTROL,
|
| - 0}},
|
| + ui::DomKey::OS},
|
| + {ui::VKEY_CONTROL, ui::DomCode::CONTROL_LEFT, ui::EF_CONTROL_DOWN,
|
| + ui::DomKey::CONTROL}},
|
|
|
| // Press Shift+Control+Alt+Search. Confirm the event is now Control with
|
| // Shift and Control modifiers.
|
| {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_LWIN,
|
| - ui::DomCode::OS_LEFT,
|
| + {ui::VKEY_LWIN, ui::DomCode::OS_LEFT,
|
| ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN | ui::EF_ALT_DOWN |
|
| ui::EF_COMMAND_DOWN,
|
| - ui::DomKey::OS,
|
| - 0},
|
| - {ui::VKEY_CONTROL,
|
| - ui::DomCode::CONTROL_LEFT,
|
| - ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN,
|
| - ui::DomKey::CONTROL,
|
| - 0}},
|
| + ui::DomKey::OS},
|
| + {ui::VKEY_CONTROL, ui::DomCode::CONTROL_LEFT,
|
| + ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN, ui::DomKey::CONTROL}},
|
|
|
| // Press Shift+Control+Alt+Search+B. Confirm the event is now B with Shift
|
| // and Control modifiers.
|
| {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_B,
|
| - ui::DomCode::KEY_B,
|
| + {ui::VKEY_B, ui::DomCode::KEY_B,
|
| ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN | ui::EF_ALT_DOWN |
|
| ui::EF_COMMAND_DOWN,
|
| - ui::DomKey::CHARACTER,
|
| - 'B'},
|
| - {ui::VKEY_B,
|
| - ui::DomCode::KEY_B,
|
| - ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN,
|
| - ui::DomKey::CHARACTER,
|
| - 0x02}},
|
| + ui::DomKey::Constant<'B'>::Character},
|
| + {ui::VKEY_B, ui::DomCode::KEY_B, ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN,
|
| + ui::DomKey::Constant<0x02>::Character}},
|
| };
|
|
|
| for (const auto& test : sa_tests) {
|
| @@ -1192,16 +826,9 @@ TEST_F(EventRewriterTest, TestRewriteModifiersRemapToEscape) {
|
| KeyTestCase tests[] = {
|
| // Press Search. Confirm the event is now VKEY_ESCAPE.
|
| {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_LWIN,
|
| - ui::DomCode::OS_LEFT,
|
| - ui::EF_COMMAND_DOWN,
|
| - ui::DomKey::OS,
|
| - 0},
|
| - {ui::VKEY_ESCAPE,
|
| - ui::DomCode::ESCAPE,
|
| - ui::EF_NONE,
|
| - ui::DomKey::ESCAPE,
|
| - 0x1B}},
|
| + {ui::VKEY_LWIN, ui::DomCode::OS_LEFT, ui::EF_COMMAND_DOWN,
|
| + ui::DomKey::OS},
|
| + {ui::VKEY_ESCAPE, ui::DomCode::ESCAPE, ui::EF_NONE, ui::DomKey::ESCAPE}},
|
| };
|
|
|
| for (const auto& test : tests) {
|
| @@ -1224,16 +851,10 @@ TEST_F(EventRewriterTest, TestRewriteModifiersRemapMany) {
|
| KeyTestCase s2a_tests[] = {
|
| // Press Search. Confirm the event is now VKEY_MENU.
|
| {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_LWIN,
|
| - ui::DomCode::OS_LEFT,
|
| - ui::EF_COMMAND_DOWN,
|
| - ui::DomKey::OS,
|
| - 0},
|
| - {ui::VKEY_MENU,
|
| - ui::DomCode::ALT_LEFT,
|
| - ui::EF_ALT_DOWN,
|
| - ui::DomKey::ALT,
|
| - 0}},
|
| + {ui::VKEY_LWIN, ui::DomCode::OS_LEFT, ui::EF_COMMAND_DOWN,
|
| + ui::DomKey::OS},
|
| + {ui::VKEY_MENU, ui::DomCode::ALT_LEFT, ui::EF_ALT_DOWN,
|
| + ui::DomKey::ALT}},
|
| };
|
|
|
| for (const auto& test : s2a_tests) {
|
| @@ -1248,42 +869,23 @@ TEST_F(EventRewriterTest, TestRewriteModifiersRemapMany) {
|
| KeyTestCase a2c_tests[] = {
|
| // Press left Alt. Confirm the event is now VKEY_CONTROL.
|
| {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_MENU,
|
| - ui::DomCode::ALT_LEFT,
|
| - ui::EF_ALT_DOWN,
|
| - ui::DomKey::ALT,
|
| - 0},
|
| - {ui::VKEY_CONTROL,
|
| - ui::DomCode::CONTROL_LEFT,
|
| - ui::EF_CONTROL_DOWN,
|
| - ui::DomKey::CONTROL,
|
| - 0}},
|
| + {ui::VKEY_MENU, ui::DomCode::ALT_LEFT, ui::EF_ALT_DOWN, ui::DomKey::ALT},
|
| + {ui::VKEY_CONTROL, ui::DomCode::CONTROL_LEFT, ui::EF_CONTROL_DOWN,
|
| + ui::DomKey::CONTROL}},
|
| // Press Shift+comma. Verify that only the flags are changed.
|
| // The X11 portion of the test addresses crbug.com/390263 by verifying
|
| // that the X keycode remains that for ',<' and not for 105-key '<>'.
|
| {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_OEM_COMMA,
|
| - ui::DomCode::COMMA,
|
| - ui::EF_SHIFT_DOWN | ui::EF_ALT_DOWN,
|
| - ui::DomKey::UNIDENTIFIED,
|
| - 0},
|
| - {ui::VKEY_OEM_COMMA,
|
| - ui::DomCode::COMMA,
|
| - ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN,
|
| - ui::DomKey::UNIDENTIFIED,
|
| - 0}},
|
| + {ui::VKEY_OEM_COMMA, ui::DomCode::COMMA,
|
| + ui::EF_SHIFT_DOWN | ui::EF_ALT_DOWN, ui::DomKey::UNIDENTIFIED},
|
| + {ui::VKEY_OEM_COMMA, ui::DomCode::COMMA,
|
| + ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN, ui::DomKey::UNIDENTIFIED}},
|
| // Press Shift+9. Verify that only the flags are changed.
|
| {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_9,
|
| - ui::DomCode::DIGIT9,
|
| - ui::EF_SHIFT_DOWN | ui::EF_ALT_DOWN,
|
| - ui::DomKey::UNIDENTIFIED,
|
| - 0},
|
| - {ui::VKEY_9,
|
| - ui::DomCode::DIGIT9,
|
| - ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN,
|
| - ui::DomKey::UNIDENTIFIED,
|
| - 0}},
|
| + {ui::VKEY_9, ui::DomCode::DIGIT9, ui::EF_SHIFT_DOWN | ui::EF_ALT_DOWN,
|
| + ui::DomKey::UNIDENTIFIED},
|
| + {ui::VKEY_9, ui::DomCode::DIGIT9,
|
| + ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN, ui::DomKey::UNIDENTIFIED}},
|
| };
|
|
|
| for (const auto& test : a2c_tests) {
|
| @@ -1298,59 +900,41 @@ TEST_F(EventRewriterTest, TestRewriteModifiersRemapMany) {
|
| KeyTestCase c2s_tests[] = {
|
| // Press left Control. Confirm the event is now VKEY_LWIN.
|
| {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_CONTROL,
|
| - ui::DomCode::CONTROL_LEFT,
|
| - ui::EF_CONTROL_DOWN,
|
| - ui::DomKey::CONTROL,
|
| - 0},
|
| - {ui::VKEY_LWIN,
|
| - ui::DomCode::OS_LEFT,
|
| - ui::EF_COMMAND_DOWN,
|
| - ui::DomKey::OS,
|
| - 0}},
|
| + {ui::VKEY_CONTROL, ui::DomCode::CONTROL_LEFT, ui::EF_CONTROL_DOWN,
|
| + ui::DomKey::CONTROL},
|
| + {ui::VKEY_LWIN, ui::DomCode::OS_LEFT, ui::EF_COMMAND_DOWN,
|
| + ui::DomKey::OS}},
|
|
|
| // Then, press all of the three, Control+Alt+Search.
|
| {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_LWIN,
|
| - ui::DomCode::OS_LEFT,
|
| + {ui::VKEY_LWIN, ui::DomCode::OS_LEFT,
|
| ui::EF_CONTROL_DOWN | ui::EF_ALT_DOWN | ui::EF_COMMAND_DOWN,
|
| - ui::DomKey::OS,
|
| - 0},
|
| - {ui::VKEY_MENU,
|
| - ui::DomCode::ALT_LEFT,
|
| + ui::DomKey::OS},
|
| + {ui::VKEY_MENU, ui::DomCode::ALT_LEFT,
|
| ui::EF_CONTROL_DOWN | ui::EF_ALT_DOWN | ui::EF_COMMAND_DOWN,
|
| - ui::DomKey::ALT,
|
| - 0}},
|
| + ui::DomKey::ALT}},
|
|
|
| // Press Shift+Control+Alt+Search.
|
| {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_LWIN,
|
| - ui::DomCode::OS_LEFT,
|
| + {ui::VKEY_LWIN, ui::DomCode::OS_LEFT,
|
| ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN | ui::EF_ALT_DOWN |
|
| ui::EF_COMMAND_DOWN,
|
| - ui::DomKey::OS,
|
| - 0},
|
| - {ui::VKEY_MENU,
|
| - ui::DomCode::ALT_LEFT,
|
| + ui::DomKey::OS},
|
| + {ui::VKEY_MENU, ui::DomCode::ALT_LEFT,
|
| ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN | ui::EF_ALT_DOWN |
|
| ui::EF_COMMAND_DOWN,
|
| - ui::DomKey::ALT,
|
| - 0}},
|
| + ui::DomKey::ALT}},
|
|
|
| // Press Shift+Control+Alt+Search+B
|
| {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_B,
|
| - ui::DomCode::KEY_B,
|
| + {ui::VKEY_B, ui::DomCode::KEY_B,
|
| ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN | ui::EF_ALT_DOWN |
|
| ui::EF_COMMAND_DOWN,
|
| - ui::DomKey::CHARACTER,
|
| - 'B'},
|
| - {ui::VKEY_B,
|
| - ui::DomCode::KEY_B,
|
| + ui::DomKey::Constant<'B'>::Character},
|
| + {ui::VKEY_B, ui::DomCode::KEY_B,
|
| ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN | ui::EF_ALT_DOWN |
|
| ui::EF_COMMAND_DOWN,
|
| - ui::DomKey::CHARACTER,
|
| - 'B'}},
|
| + ui::DomKey::Constant<'B'>::Character}},
|
| };
|
|
|
| for (const auto& test : c2s_tests) {
|
| @@ -1376,20 +960,20 @@ TEST_F(EventRewriterTest, TestRewriteModifiersRemapToCapsLock) {
|
| // Press Search.
|
| EXPECT_EQ(GetExpectedResultAsString(ui::ET_KEY_PRESSED, ui::VKEY_CAPITAL,
|
| ui::DomCode::CAPS_LOCK, ui::EF_MOD3_DOWN,
|
| - ui::DomKey::CAPS_LOCK, 0),
|
| + ui::DomKey::CAPS_LOCK),
|
| GetRewrittenEventAsString(&rewriter, ui::ET_KEY_PRESSED,
|
| ui::VKEY_LWIN, ui::DomCode::OS_LEFT,
|
| - ui::EF_COMMAND_DOWN, ui::DomKey::OS, 0));
|
| + ui::EF_COMMAND_DOWN, ui::DomKey::OS));
|
| // Confirm that the Caps Lock status is changed.
|
| EXPECT_TRUE(ime_keyboard.caps_lock_is_enabled_);
|
|
|
| // Release Search.
|
| EXPECT_EQ(GetExpectedResultAsString(ui::ET_KEY_RELEASED, ui::VKEY_CAPITAL,
|
| ui::DomCode::CAPS_LOCK, ui::EF_NONE,
|
| - ui::DomKey::CAPS_LOCK, 0),
|
| + ui::DomKey::CAPS_LOCK),
|
| GetRewrittenEventAsString(&rewriter, ui::ET_KEY_RELEASED,
|
| ui::VKEY_LWIN, ui::DomCode::OS_LEFT,
|
| - ui::EF_NONE, ui::DomKey::OS, 0));
|
| + ui::EF_NONE, ui::DomKey::OS));
|
| // Confirm that the Caps Lock status is not changed.
|
| EXPECT_TRUE(ime_keyboard.caps_lock_is_enabled_);
|
|
|
| @@ -1397,20 +981,20 @@ TEST_F(EventRewriterTest, TestRewriteModifiersRemapToCapsLock) {
|
| EXPECT_EQ(
|
| GetExpectedResultAsString(
|
| ui::ET_KEY_PRESSED, ui::VKEY_CAPITAL, ui::DomCode::CAPS_LOCK,
|
| - ui::EF_CAPS_LOCK_DOWN | ui::EF_MOD3_DOWN, ui::DomKey::CAPS_LOCK, 0),
|
| + ui::EF_CAPS_LOCK_DOWN | ui::EF_MOD3_DOWN, ui::DomKey::CAPS_LOCK),
|
| GetRewrittenEventAsString(
|
| &rewriter, ui::ET_KEY_PRESSED, ui::VKEY_LWIN, ui::DomCode::OS_LEFT,
|
| - ui::EF_COMMAND_DOWN | ui::EF_CAPS_LOCK_DOWN, ui::DomKey::OS, 0));
|
| + ui::EF_COMMAND_DOWN | ui::EF_CAPS_LOCK_DOWN, ui::DomKey::OS));
|
| // Confirm that the Caps Lock status is changed.
|
| EXPECT_FALSE(ime_keyboard.caps_lock_is_enabled_);
|
|
|
| // Release Search.
|
| EXPECT_EQ(GetExpectedResultAsString(ui::ET_KEY_RELEASED, ui::VKEY_CAPITAL,
|
| ui::DomCode::CAPS_LOCK, ui::EF_NONE,
|
| - ui::DomKey::CAPS_LOCK, 0),
|
| + ui::DomKey::CAPS_LOCK),
|
| GetRewrittenEventAsString(&rewriter, ui::ET_KEY_RELEASED,
|
| ui::VKEY_LWIN, ui::DomCode::OS_LEFT,
|
| - ui::EF_NONE, ui::DomKey::OS, 0));
|
| + ui::EF_NONE, ui::DomKey::OS));
|
| // Confirm that the Caps Lock status is not changed.
|
| EXPECT_FALSE(ime_keyboard.caps_lock_is_enabled_);
|
|
|
| @@ -1418,11 +1002,11 @@ TEST_F(EventRewriterTest, TestRewriteModifiersRemapToCapsLock) {
|
| EXPECT_EQ(GetExpectedResultAsString(ui::ET_KEY_PRESSED, ui::VKEY_CAPITAL,
|
| ui::DomCode::CAPS_LOCK,
|
| ui::EF_CAPS_LOCK_DOWN | ui::EF_MOD3_DOWN,
|
| - ui::DomKey::CAPS_LOCK, 0),
|
| + ui::DomKey::CAPS_LOCK),
|
| GetRewrittenEventAsString(&rewriter, ui::ET_KEY_PRESSED,
|
| ui::VKEY_CAPITAL, ui::DomCode::CAPS_LOCK,
|
| ui::EF_CAPS_LOCK_DOWN | ui::EF_MOD3_DOWN,
|
| - ui::DomKey::CAPS_LOCK, 0));
|
| + ui::DomKey::CAPS_LOCK));
|
|
|
| #if defined(USE_X11)
|
| // Confirm that calling RewriteForTesting() does not change the state of
|
| @@ -1439,10 +1023,10 @@ TEST_F(EventRewriterTest, TestRewriteModifiersRemapToCapsLock) {
|
| // Release Caps Lock (on an external keyboard).
|
| EXPECT_EQ(GetExpectedResultAsString(ui::ET_KEY_RELEASED, ui::VKEY_CAPITAL,
|
| ui::DomCode::CAPS_LOCK, ui::EF_NONE,
|
| - ui::DomKey::CAPS_LOCK, 0),
|
| + ui::DomKey::CAPS_LOCK),
|
| GetRewrittenEventAsString(&rewriter, ui::ET_KEY_RELEASED,
|
| ui::VKEY_CAPITAL, ui::DomCode::CAPS_LOCK,
|
| - ui::EF_NONE, ui::DomKey::CAPS_LOCK, 0));
|
| + ui::EF_NONE, ui::DomKey::CAPS_LOCK));
|
| #if defined(USE_X11)
|
| EXPECT_FALSE(ime_keyboard.caps_lock_is_enabled_);
|
| #elif defined(USE_OZONE)
|
| @@ -1465,10 +1049,10 @@ TEST_F(EventRewriterTest, TestRewriteCapsLock) {
|
| EXPECT_EQ(GetExpectedResultAsString(ui::ET_KEY_PRESSED, ui::VKEY_CAPITAL,
|
| ui::DomCode::CAPS_LOCK,
|
| ui::EF_CAPS_LOCK_DOWN | ui::EF_MOD3_DOWN,
|
| - ui::DomKey::CAPS_LOCK, 0),
|
| + ui::DomKey::CAPS_LOCK),
|
| GetRewrittenEventAsString(&rewriter, ui::ET_KEY_PRESSED,
|
| ui::VKEY_F16, ui::DomCode::F16,
|
| - ui::EF_MOD3_DOWN, ui::DomKey::F16, 0));
|
| + ui::EF_MOD3_DOWN, ui::DomKey::F16));
|
| EXPECT_TRUE(ime_keyboard.caps_lock_is_enabled_);
|
| }
|
|
|
| @@ -1486,34 +1070,22 @@ TEST_F(EventRewriterTest, TestRewriteDiamondKey) {
|
| // F15 should work as Ctrl when --has-chromeos-diamond-key is not
|
| // specified.
|
| {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_F15, ui::DomCode::F15, ui::EF_NONE, ui::DomKey::F15, 0},
|
| - {ui::VKEY_CONTROL,
|
| - ui::DomCode::CONTROL_LEFT,
|
| - ui::EF_CONTROL_DOWN,
|
| - ui::DomKey::CONTROL,
|
| - 0}},
|
| + {ui::VKEY_F15, ui::DomCode::F15, ui::EF_NONE, ui::DomKey::F15},
|
| + {ui::VKEY_CONTROL, ui::DomCode::CONTROL_LEFT, ui::EF_CONTROL_DOWN,
|
| + ui::DomKey::CONTROL}},
|
|
|
| {ui::ET_KEY_RELEASED,
|
| - {ui::VKEY_F15, ui::DomCode::F15, ui::EF_NONE, ui::DomKey::F15, 0},
|
| - {ui::VKEY_CONTROL,
|
| - ui::DomCode::CONTROL_LEFT,
|
| - ui::EF_NONE,
|
| - ui::DomKey::CONTROL,
|
| - 0}},
|
| + {ui::VKEY_F15, ui::DomCode::F15, ui::EF_NONE, ui::DomKey::F15},
|
| + {ui::VKEY_CONTROL, ui::DomCode::CONTROL_LEFT, ui::EF_NONE,
|
| + ui::DomKey::CONTROL}},
|
|
|
| // However, Mod2Mask should not be rewritten to CtrlMask when
|
| // --has-chromeos-diamond-key is not specified.
|
| {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_A,
|
| - ui::DomCode::KEY_A,
|
| - ui::EF_NONE,
|
| - ui::DomKey::CHARACTER,
|
| - 'a'},
|
| - {ui::VKEY_A,
|
| - ui::DomCode::KEY_A,
|
| - ui::EF_NONE,
|
| - ui::DomKey::CHARACTER,
|
| - 'a'}},
|
| + {ui::VKEY_A, ui::DomCode::KEY_A, ui::EF_NONE,
|
| + ui::DomKey::Constant<'a'>::Character},
|
| + {ui::VKEY_A, ui::DomCode::KEY_A, ui::EF_NONE,
|
| + ui::DomKey::Constant<'a'>::Character}},
|
| };
|
|
|
| for (const auto& test : tests) {
|
| @@ -1536,33 +1108,33 @@ TEST_F(EventRewriterTest, TestRewriteDiamondKeyWithFlag) {
|
| rewriter.set_ime_keyboard_for_testing(&ime_keyboard);
|
|
|
| // By default, F15 should work as Control.
|
| - EXPECT_EQ(GetExpectedResultAsString(
|
| - ui::ET_KEY_PRESSED, ui::VKEY_CONTROL, ui::DomCode::CONTROL_LEFT,
|
| - ui::EF_CONTROL_DOWN, ui::DomKey::CONTROL, 0),
|
| + EXPECT_EQ(GetExpectedResultAsString(ui::ET_KEY_PRESSED, ui::VKEY_CONTROL,
|
| + ui::DomCode::CONTROL_LEFT,
|
| + ui::EF_CONTROL_DOWN, ui::DomKey::CONTROL),
|
| GetRewrittenEventAsString(&rewriter, ui::ET_KEY_PRESSED,
|
| ui::VKEY_F15, ui::DomCode::F15,
|
| - ui::EF_NONE, ui::DomKey::F15, 0));
|
| + ui::EF_NONE, ui::DomKey::F15));
|
| // Check that Control is applied to a subsequent key press.
|
| EXPECT_EQ(GetExpectedResultAsString(ui::ET_KEY_PRESSED, ui::VKEY_A,
|
| ui::DomCode::KEY_A, ui::EF_CONTROL_DOWN,
|
| - ui::DomKey::CHARACTER, 0x01),
|
| + ui::DomKey::Constant<0x01>::Character),
|
| GetRewrittenEventAsString(&rewriter, ui::ET_KEY_PRESSED, ui::VKEY_A,
|
| ui::DomCode::KEY_A, ui::EF_NONE,
|
| - ui::DomKey::CHARACTER, 'a'));
|
| + ui::DomKey::Constant<'a'>::Character));
|
| // Release F15
|
| EXPECT_EQ(GetExpectedResultAsString(ui::ET_KEY_RELEASED, ui::VKEY_CONTROL,
|
| ui::DomCode::CONTROL_LEFT, ui::EF_NONE,
|
| - ui::DomKey::CONTROL, 0),
|
| + ui::DomKey::CONTROL),
|
| GetRewrittenEventAsString(&rewriter, ui::ET_KEY_RELEASED,
|
| ui::VKEY_F15, ui::DomCode::F15,
|
| - ui::EF_NONE, ui::DomKey::F15, 0));
|
| + ui::EF_NONE, ui::DomKey::F15));
|
| // Check that Control is no longer applied to a subsequent key press.
|
| EXPECT_EQ(GetExpectedResultAsString(ui::ET_KEY_PRESSED, ui::VKEY_A,
|
| ui::DomCode::KEY_A, ui::EF_NONE,
|
| - ui::DomKey::CHARACTER, 'a'),
|
| + ui::DomKey::Constant<'a'>::Character),
|
| GetRewrittenEventAsString(&rewriter, ui::ET_KEY_PRESSED, ui::VKEY_A,
|
| ui::DomCode::KEY_A, ui::EF_NONE,
|
| - ui::DomKey::CHARACTER, 'a'));
|
| + ui::DomKey::Constant<'a'>::Character));
|
|
|
| IntegerPrefMember diamond;
|
| diamond.Init(prefs::kLanguageRemapDiamondKeyTo, &prefs);
|
| @@ -1570,109 +1142,109 @@ TEST_F(EventRewriterTest, TestRewriteDiamondKeyWithFlag) {
|
|
|
| EXPECT_EQ(GetExpectedResultAsString(ui::ET_KEY_PRESSED, ui::VKEY_UNKNOWN,
|
| ui::DomCode::NONE, ui::EF_NONE,
|
| - ui::DomKey::UNIDENTIFIED, 0),
|
| + ui::DomKey::UNIDENTIFIED),
|
| GetRewrittenEventAsString(&rewriter, ui::ET_KEY_PRESSED,
|
| ui::VKEY_F15, ui::DomCode::F15,
|
| - ui::EF_NONE, ui::DomKey::F15, 0));
|
| + ui::EF_NONE, ui::DomKey::F15));
|
| // Check that no modifier is applied to another key.
|
| EXPECT_EQ(GetExpectedResultAsString(ui::ET_KEY_PRESSED, ui::VKEY_A,
|
| ui::DomCode::KEY_A, ui::EF_NONE,
|
| - ui::DomKey::CHARACTER, 'a'),
|
| + ui::DomKey::Constant<'a'>::Character),
|
| GetRewrittenEventAsString(&rewriter, ui::ET_KEY_PRESSED, ui::VKEY_A,
|
| ui::DomCode::KEY_A, ui::EF_NONE,
|
| - ui::DomKey::CHARACTER, 'a'));
|
| + ui::DomKey::Constant<'a'>::Character));
|
|
|
| diamond.SetValue(chromeos::input_method::kControlKey);
|
|
|
| - EXPECT_EQ(GetExpectedResultAsString(
|
| - ui::ET_KEY_PRESSED, ui::VKEY_CONTROL, ui::DomCode::CONTROL_LEFT,
|
| - ui::EF_CONTROL_DOWN, ui::DomKey::CONTROL, 0),
|
| + EXPECT_EQ(GetExpectedResultAsString(ui::ET_KEY_PRESSED, ui::VKEY_CONTROL,
|
| + ui::DomCode::CONTROL_LEFT,
|
| + ui::EF_CONTROL_DOWN, ui::DomKey::CONTROL),
|
| GetRewrittenEventAsString(&rewriter, ui::ET_KEY_PRESSED,
|
| ui::VKEY_F15, ui::DomCode::F15,
|
| - ui::EF_NONE, ui::DomKey::F15, 0));
|
| + ui::EF_NONE, ui::DomKey::F15));
|
| // Check that Control is applied to a subsequent key press.
|
| EXPECT_EQ(GetExpectedResultAsString(ui::ET_KEY_PRESSED, ui::VKEY_A,
|
| ui::DomCode::KEY_A, ui::EF_CONTROL_DOWN,
|
| - ui::DomKey::CHARACTER, 0x01),
|
| + ui::DomKey::Constant<0x01>::Character),
|
| GetRewrittenEventAsString(&rewriter, ui::ET_KEY_PRESSED, ui::VKEY_A,
|
| ui::DomCode::KEY_A, ui::EF_NONE,
|
| - ui::DomKey::CHARACTER, 'a'));
|
| + ui::DomKey::Constant<'a'>::Character));
|
| // Release F15
|
| EXPECT_EQ(GetExpectedResultAsString(ui::ET_KEY_RELEASED, ui::VKEY_CONTROL,
|
| ui::DomCode::CONTROL_LEFT, ui::EF_NONE,
|
| - ui::DomKey::CONTROL, 0),
|
| + ui::DomKey::CONTROL),
|
| GetRewrittenEventAsString(&rewriter, ui::ET_KEY_RELEASED,
|
| ui::VKEY_F15, ui::DomCode::F15,
|
| - ui::EF_NONE, ui::DomKey::F15, 0));
|
| + ui::EF_NONE, ui::DomKey::F15));
|
| // Check that Control is no longer applied to a subsequent key press.
|
| EXPECT_EQ(GetExpectedResultAsString(ui::ET_KEY_PRESSED, ui::VKEY_A,
|
| ui::DomCode::KEY_A, ui::EF_NONE,
|
| - ui::DomKey::CHARACTER, 'a'),
|
| + ui::DomKey::Constant<'a'>::Character),
|
| GetRewrittenEventAsString(&rewriter, ui::ET_KEY_PRESSED, ui::VKEY_A,
|
| ui::DomCode::KEY_A, ui::EF_NONE,
|
| - ui::DomKey::CHARACTER, 'a'));
|
| + ui::DomKey::Constant<'a'>::Character));
|
|
|
| diamond.SetValue(chromeos::input_method::kAltKey);
|
|
|
| EXPECT_EQ(GetExpectedResultAsString(ui::ET_KEY_PRESSED, ui::VKEY_MENU,
|
| ui::DomCode::ALT_LEFT, ui::EF_ALT_DOWN,
|
| - ui::DomKey::ALT, 0),
|
| + ui::DomKey::ALT),
|
| GetRewrittenEventAsString(&rewriter, ui::ET_KEY_PRESSED,
|
| ui::VKEY_F15, ui::DomCode::F15,
|
| - ui::EF_NONE, ui::DomKey::F15, 0));
|
| + ui::EF_NONE, ui::DomKey::F15));
|
| // Check that Alt is applied to a subsequent key press.
|
| EXPECT_EQ(GetExpectedResultAsString(ui::ET_KEY_PRESSED, ui::VKEY_A,
|
| ui::DomCode::KEY_A, ui::EF_ALT_DOWN,
|
| - ui::DomKey::CHARACTER, 'a'),
|
| + ui::DomKey::Constant<'a'>::Character),
|
| GetRewrittenEventAsString(&rewriter, ui::ET_KEY_PRESSED, ui::VKEY_A,
|
| ui::DomCode::KEY_A, ui::EF_NONE,
|
| - ui::DomKey::CHARACTER, 'a'));
|
| + ui::DomKey::Constant<'a'>::Character));
|
| // Release F15
|
| EXPECT_EQ(GetExpectedResultAsString(ui::ET_KEY_RELEASED, ui::VKEY_MENU,
|
| ui::DomCode::ALT_LEFT, ui::EF_NONE,
|
| - ui::DomKey::ALT, 0),
|
| + ui::DomKey::ALT),
|
| GetRewrittenEventAsString(&rewriter, ui::ET_KEY_RELEASED,
|
| ui::VKEY_F15, ui::DomCode::F15,
|
| - ui::EF_NONE, ui::DomKey::F15, 0));
|
| + ui::EF_NONE, ui::DomKey::F15));
|
| // Check that Alt is no longer applied to a subsequent key press.
|
| EXPECT_EQ(GetExpectedResultAsString(ui::ET_KEY_PRESSED, ui::VKEY_A,
|
| ui::DomCode::KEY_A, ui::EF_NONE,
|
| - ui::DomKey::CHARACTER, 'a'),
|
| + ui::DomKey::Constant<'a'>::Character),
|
| GetRewrittenEventAsString(&rewriter, ui::ET_KEY_PRESSED, ui::VKEY_A,
|
| ui::DomCode::KEY_A, ui::EF_NONE,
|
| - ui::DomKey::CHARACTER, 'a'));
|
| + ui::DomKey::Constant<'a'>::Character));
|
|
|
| diamond.SetValue(chromeos::input_method::kCapsLockKey);
|
|
|
| EXPECT_EQ(GetExpectedResultAsString(ui::ET_KEY_PRESSED, ui::VKEY_CAPITAL,
|
| ui::DomCode::CAPS_LOCK,
|
| ui::EF_CAPS_LOCK_DOWN | ui::EF_MOD3_DOWN,
|
| - ui::DomKey::CAPS_LOCK, 0),
|
| + ui::DomKey::CAPS_LOCK),
|
| GetRewrittenEventAsString(&rewriter, ui::ET_KEY_PRESSED,
|
| ui::VKEY_F15, ui::DomCode::F15,
|
| - ui::EF_NONE, ui::DomKey::F15, 0));
|
| + ui::EF_NONE, ui::DomKey::F15));
|
| // Check that Caps is applied to a subsequent key press.
|
| EXPECT_EQ(GetExpectedResultAsString(ui::ET_KEY_PRESSED, ui::VKEY_A,
|
| ui::DomCode::KEY_A,
|
| ui::EF_CAPS_LOCK_DOWN | ui::EF_MOD3_DOWN,
|
| - ui::DomKey::CHARACTER, 'A'),
|
| + ui::DomKey::Constant<'A'>::Character),
|
| GetRewrittenEventAsString(&rewriter, ui::ET_KEY_PRESSED, ui::VKEY_A,
|
| ui::DomCode::KEY_A, ui::EF_NONE,
|
| - ui::DomKey::CHARACTER, 'a'));
|
| + ui::DomKey::Constant<'a'>::Character));
|
| // Release F15
|
| EXPECT_EQ(GetExpectedResultAsString(ui::ET_KEY_RELEASED, ui::VKEY_CAPITAL,
|
| ui::DomCode::CAPS_LOCK, ui::EF_NONE,
|
| - ui::DomKey::CAPS_LOCK, 0),
|
| + ui::DomKey::CAPS_LOCK),
|
| GetRewrittenEventAsString(&rewriter, ui::ET_KEY_RELEASED,
|
| ui::VKEY_F15, ui::DomCode::F15,
|
| - ui::EF_NONE, ui::DomKey::F15, 0));
|
| + ui::EF_NONE, ui::DomKey::F15));
|
| // Check that Control is no longer applied to a subsequent key press.
|
| EXPECT_EQ(GetExpectedResultAsString(ui::ET_KEY_PRESSED, ui::VKEY_A,
|
| ui::DomCode::KEY_A, ui::EF_NONE,
|
| - ui::DomKey::CHARACTER, 'a'),
|
| + ui::DomKey::Constant<'a'>::Character),
|
| GetRewrittenEventAsString(&rewriter, ui::ET_KEY_PRESSED, ui::VKEY_A,
|
| ui::DomCode::KEY_A, ui::EF_NONE,
|
| - ui::DomKey::CHARACTER, 'a'));
|
| + ui::DomKey::Constant<'a'>::Character));
|
|
|
| *base::CommandLine::ForCurrentProcess() = original_cl;
|
| }
|
| @@ -1693,44 +1265,26 @@ TEST_F(EventRewriterTest, TestRewriteCapsLockToControl) {
|
| // Press CapsLock+a. Confirm that Mod3Mask is rewritten to ControlMask.
|
| // On Chrome OS, CapsLock works as a Mod3 modifier.
|
| {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_A,
|
| - ui::DomCode::KEY_A,
|
| - ui::EF_MOD3_DOWN,
|
| - ui::DomKey::CHARACTER,
|
| - 'a'},
|
| - {ui::VKEY_A,
|
| - ui::DomCode::KEY_A,
|
| - ui::EF_CONTROL_DOWN,
|
| - ui::DomKey::CHARACTER,
|
| - 0x01}},
|
| + {ui::VKEY_A, ui::DomCode::KEY_A, ui::EF_MOD3_DOWN,
|
| + ui::DomKey::Constant<'a'>::Character},
|
| + {ui::VKEY_A, ui::DomCode::KEY_A, ui::EF_CONTROL_DOWN,
|
| + ui::DomKey::Constant<0x01>::Character}},
|
|
|
| // Press Control+CapsLock+a. Confirm that Mod3Mask is rewritten to
|
| // ControlMask
|
| {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_A,
|
| - ui::DomCode::KEY_A,
|
| - ui::EF_CONTROL_DOWN | ui::EF_MOD3_DOWN,
|
| - ui::DomKey::CHARACTER,
|
| - 'a'},
|
| - {ui::VKEY_A,
|
| - ui::DomCode::KEY_A,
|
| - ui::EF_CONTROL_DOWN,
|
| - ui::DomKey::CHARACTER,
|
| - 0x01}},
|
| + {ui::VKEY_A, ui::DomCode::KEY_A, ui::EF_CONTROL_DOWN | ui::EF_MOD3_DOWN,
|
| + ui::DomKey::Constant<'a'>::Character},
|
| + {ui::VKEY_A, ui::DomCode::KEY_A, ui::EF_CONTROL_DOWN,
|
| + ui::DomKey::Constant<0x01>::Character}},
|
|
|
| // Press Alt+CapsLock+a. Confirm that Mod3Mask is rewritten to
|
| // ControlMask.
|
| {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_A,
|
| - ui::DomCode::KEY_A,
|
| - ui::EF_ALT_DOWN | ui::EF_MOD3_DOWN,
|
| - ui::DomKey::CHARACTER,
|
| - 'a'},
|
| - {ui::VKEY_A,
|
| - ui::DomCode::KEY_A,
|
| - ui::EF_ALT_DOWN | ui::EF_CONTROL_DOWN,
|
| - ui::DomKey::CHARACTER,
|
| - 0x01}},
|
| + {ui::VKEY_A, ui::DomCode::KEY_A, ui::EF_ALT_DOWN | ui::EF_MOD3_DOWN,
|
| + ui::DomKey::Constant<'a'>::Character},
|
| + {ui::VKEY_A, ui::DomCode::KEY_A, ui::EF_ALT_DOWN | ui::EF_CONTROL_DOWN,
|
| + ui::DomKey::Constant<0x01>::Character}},
|
| };
|
|
|
| for (const auto& test : tests) {
|
| @@ -1755,10 +1309,10 @@ TEST_F(EventRewriterTest, TestRewriteCapsLockMod3InUse) {
|
| // when Mod3Mask is already in use by the current XKB layout.
|
| EXPECT_EQ(GetExpectedResultAsString(ui::ET_KEY_PRESSED, ui::VKEY_A,
|
| ui::DomCode::KEY_A, ui::EF_NONE,
|
| - ui::DomKey::CHARACTER, 'a'),
|
| + ui::DomKey::Constant<'a'>::Character),
|
| GetRewrittenEventAsString(&rewriter, ui::ET_KEY_PRESSED, ui::VKEY_A,
|
| ui::DomCode::KEY_A, ui::EF_NONE,
|
| - ui::DomKey::CHARACTER, 'a'));
|
| + ui::DomKey::Constant<'a'>::Character));
|
|
|
| input_method_manager_mock_->set_mod3_used(false);
|
| }
|
| @@ -1774,247 +1328,135 @@ TEST_F(EventRewriterTest, TestRewriteExtendedKeys) {
|
| KeyTestCase tests[] = {
|
| // Alt+Backspace -> Delete
|
| {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_BACK,
|
| - ui::DomCode::BACKSPACE,
|
| - ui::EF_ALT_DOWN,
|
| - ui::DomKey::BACKSPACE,
|
| - '\b'},
|
| - {ui::VKEY_DELETE, ui::DomCode::DEL, ui::EF_NONE, ui::DomKey::DEL, 0x7F}},
|
| + {ui::VKEY_BACK, ui::DomCode::BACKSPACE, ui::EF_ALT_DOWN,
|
| + ui::DomKey::BACKSPACE},
|
| + {ui::VKEY_DELETE, ui::DomCode::DEL, ui::EF_NONE, ui::DomKey::DEL}},
|
| // Control+Alt+Backspace -> Control+Delete
|
| {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_BACK,
|
| - ui::DomCode::BACKSPACE,
|
| - ui::EF_ALT_DOWN | ui::EF_CONTROL_DOWN,
|
| - ui::DomKey::BACKSPACE,
|
| - '\b'},
|
| - {ui::VKEY_DELETE,
|
| - ui::DomCode::DEL,
|
| - ui::EF_CONTROL_DOWN,
|
| - ui::DomKey::DEL,
|
| - 0x7F}},
|
| + {ui::VKEY_BACK, ui::DomCode::BACKSPACE,
|
| + ui::EF_ALT_DOWN | ui::EF_CONTROL_DOWN, ui::DomKey::BACKSPACE},
|
| + {ui::VKEY_DELETE, ui::DomCode::DEL, ui::EF_CONTROL_DOWN,
|
| + ui::DomKey::DEL}},
|
| // Search+Alt+Backspace -> Alt+Backspace
|
| {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_BACK,
|
| - ui::DomCode::BACKSPACE,
|
| - ui::EF_COMMAND_DOWN | ui::EF_ALT_DOWN,
|
| - ui::DomKey::BACKSPACE,
|
| - '\b'},
|
| - {ui::VKEY_BACK,
|
| - ui::DomCode::BACKSPACE,
|
| - ui::EF_ALT_DOWN,
|
| - ui::DomKey::BACKSPACE,
|
| - '\b'}},
|
| + {ui::VKEY_BACK, ui::DomCode::BACKSPACE,
|
| + ui::EF_COMMAND_DOWN | ui::EF_ALT_DOWN, ui::DomKey::BACKSPACE},
|
| + {ui::VKEY_BACK, ui::DomCode::BACKSPACE, ui::EF_ALT_DOWN,
|
| + ui::DomKey::BACKSPACE}},
|
| // Search+Control+Alt+Backspace -> Control+Alt+Backspace
|
| {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_BACK,
|
| - ui::DomCode::BACKSPACE,
|
| + {ui::VKEY_BACK, ui::DomCode::BACKSPACE,
|
| ui::EF_COMMAND_DOWN | ui::EF_ALT_DOWN | ui::EF_CONTROL_DOWN,
|
| - ui::DomKey::BACKSPACE,
|
| - '\b'},
|
| - {ui::VKEY_BACK,
|
| - ui::DomCode::BACKSPACE,
|
| - ui::EF_ALT_DOWN | ui::EF_CONTROL_DOWN,
|
| - ui::DomKey::BACKSPACE,
|
| - '\b'}},
|
| + ui::DomKey::BACKSPACE},
|
| + {ui::VKEY_BACK, ui::DomCode::BACKSPACE,
|
| + ui::EF_ALT_DOWN | ui::EF_CONTROL_DOWN, ui::DomKey::BACKSPACE}},
|
| // Alt+Up -> Prior
|
| {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_UP,
|
| - ui::DomCode::ARROW_UP,
|
| - ui::EF_ALT_DOWN,
|
| - ui::DomKey::ARROW_UP,
|
| - 0},
|
| - {ui::VKEY_PRIOR,
|
| - ui::DomCode::PAGE_UP,
|
| - ui::EF_NONE,
|
| - ui::DomKey::PAGE_UP,
|
| - 0}},
|
| + {ui::VKEY_UP, ui::DomCode::ARROW_UP, ui::EF_ALT_DOWN,
|
| + ui::DomKey::ARROW_UP},
|
| + {ui::VKEY_PRIOR, ui::DomCode::PAGE_UP, ui::EF_NONE,
|
| + ui::DomKey::PAGE_UP}},
|
| // Alt+Down -> Next
|
| {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_DOWN,
|
| - ui::DomCode::ARROW_DOWN,
|
| - ui::EF_ALT_DOWN,
|
| - ui::DomKey::ARROW_DOWN,
|
| - 0},
|
| - {ui::VKEY_NEXT,
|
| - ui::DomCode::PAGE_DOWN,
|
| - ui::EF_NONE,
|
| - ui::DomKey::PAGE_DOWN,
|
| - 0}},
|
| + {ui::VKEY_DOWN, ui::DomCode::ARROW_DOWN, ui::EF_ALT_DOWN,
|
| + ui::DomKey::ARROW_DOWN},
|
| + {ui::VKEY_NEXT, ui::DomCode::PAGE_DOWN, ui::EF_NONE,
|
| + ui::DomKey::PAGE_DOWN}},
|
| // Ctrl+Alt+Up -> Home
|
| {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_UP,
|
| - ui::DomCode::ARROW_UP,
|
| - ui::EF_ALT_DOWN | ui::EF_CONTROL_DOWN,
|
| - ui::DomKey::ARROW_UP,
|
| - 0},
|
| - {ui::VKEY_HOME, ui::DomCode::HOME, ui::EF_NONE, ui::DomKey::HOME, 0}},
|
| + {ui::VKEY_UP, ui::DomCode::ARROW_UP,
|
| + ui::EF_ALT_DOWN | ui::EF_CONTROL_DOWN, ui::DomKey::ARROW_UP},
|
| + {ui::VKEY_HOME, ui::DomCode::HOME, ui::EF_NONE, ui::DomKey::HOME}},
|
| // Ctrl+Alt+Down -> End
|
| {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_DOWN,
|
| - ui::DomCode::ARROW_DOWN,
|
| - ui::EF_ALT_DOWN | ui::EF_CONTROL_DOWN,
|
| - ui::DomKey::ARROW_DOWN,
|
| - 0},
|
| - {ui::VKEY_END, ui::DomCode::END, ui::EF_NONE, ui::DomKey::END, 0}},
|
| + {ui::VKEY_DOWN, ui::DomCode::ARROW_DOWN,
|
| + ui::EF_ALT_DOWN | ui::EF_CONTROL_DOWN, ui::DomKey::ARROW_DOWN},
|
| + {ui::VKEY_END, ui::DomCode::END, ui::EF_NONE, ui::DomKey::END}},
|
|
|
| // Search+Alt+Up -> Alt+Up
|
| {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_UP,
|
| - ui::DomCode::ARROW_UP,
|
| - ui::EF_COMMAND_DOWN | ui::EF_ALT_DOWN,
|
| - ui::DomKey::ARROW_UP,
|
| - 0},
|
| - {ui::VKEY_UP,
|
| - ui::DomCode::ARROW_UP,
|
| - ui::EF_ALT_DOWN,
|
| - ui::DomKey::ARROW_UP,
|
| - 0}},
|
| + {ui::VKEY_UP, ui::DomCode::ARROW_UP,
|
| + ui::EF_COMMAND_DOWN | ui::EF_ALT_DOWN, ui::DomKey::ARROW_UP},
|
| + {ui::VKEY_UP, ui::DomCode::ARROW_UP, ui::EF_ALT_DOWN,
|
| + ui::DomKey::ARROW_UP}},
|
| // Search+Alt+Down -> Alt+Down
|
| {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_DOWN,
|
| - ui::DomCode::ARROW_DOWN,
|
| - ui::EF_COMMAND_DOWN | ui::EF_ALT_DOWN,
|
| - ui::DomKey::ARROW_DOWN,
|
| - 0},
|
| - {ui::VKEY_DOWN,
|
| - ui::DomCode::ARROW_DOWN,
|
| - ui::EF_ALT_DOWN,
|
| - ui::DomKey::ARROW_DOWN,
|
| - 0}},
|
| + {ui::VKEY_DOWN, ui::DomCode::ARROW_DOWN,
|
| + ui::EF_COMMAND_DOWN | ui::EF_ALT_DOWN, ui::DomKey::ARROW_DOWN},
|
| + {ui::VKEY_DOWN, ui::DomCode::ARROW_DOWN, ui::EF_ALT_DOWN,
|
| + ui::DomKey::ARROW_DOWN}},
|
| // Search+Ctrl+Alt+Up -> Search+Ctrl+Alt+Up
|
| {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_UP,
|
| - ui::DomCode::ARROW_UP,
|
| + {ui::VKEY_UP, ui::DomCode::ARROW_UP,
|
| ui::EF_COMMAND_DOWN | ui::EF_ALT_DOWN | ui::EF_CONTROL_DOWN,
|
| - ui::DomKey::ARROW_UP,
|
| - 0},
|
| - {ui::VKEY_UP,
|
| - ui::DomCode::ARROW_UP,
|
| - ui::EF_ALT_DOWN | ui::EF_CONTROL_DOWN,
|
| - ui::DomKey::ARROW_UP,
|
| - 0}},
|
| + ui::DomKey::ARROW_UP},
|
| + {ui::VKEY_UP, ui::DomCode::ARROW_UP,
|
| + ui::EF_ALT_DOWN | ui::EF_CONTROL_DOWN, ui::DomKey::ARROW_UP}},
|
| // Search+Ctrl+Alt+Down -> Ctrl+Alt+Down
|
| {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_DOWN,
|
| - ui::DomCode::ARROW_DOWN,
|
| + {ui::VKEY_DOWN, ui::DomCode::ARROW_DOWN,
|
| ui::EF_COMMAND_DOWN | ui::EF_ALT_DOWN | ui::EF_CONTROL_DOWN,
|
| - ui::DomKey::ARROW_DOWN,
|
| - 0},
|
| - {ui::VKEY_DOWN,
|
| - ui::DomCode::ARROW_DOWN,
|
| - ui::EF_ALT_DOWN | ui::EF_CONTROL_DOWN,
|
| - ui::DomKey::ARROW_DOWN,
|
| - 0}},
|
| + ui::DomKey::ARROW_DOWN},
|
| + {ui::VKEY_DOWN, ui::DomCode::ARROW_DOWN,
|
| + ui::EF_ALT_DOWN | ui::EF_CONTROL_DOWN, ui::DomKey::ARROW_DOWN}},
|
|
|
| // Period -> Period
|
| {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_OEM_PERIOD,
|
| - ui::DomCode::PERIOD,
|
| - ui::EF_NONE,
|
| - ui::DomKey::CHARACTER,
|
| - '.'},
|
| - {ui::VKEY_OEM_PERIOD,
|
| - ui::DomCode::PERIOD,
|
| - ui::EF_NONE,
|
| - ui::DomKey::CHARACTER,
|
| - '.'}},
|
| + {ui::VKEY_OEM_PERIOD, ui::DomCode::PERIOD, ui::EF_NONE,
|
| + ui::DomKey::Constant<'.'>::Character},
|
| + {ui::VKEY_OEM_PERIOD, ui::DomCode::PERIOD, ui::EF_NONE,
|
| + ui::DomKey::Constant<'.'>::Character}},
|
|
|
| // Search+Backspace -> Delete
|
| {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_BACK,
|
| - ui::DomCode::BACKSPACE,
|
| - ui::EF_COMMAND_DOWN,
|
| - ui::DomKey::BACKSPACE,
|
| - '\b'},
|
| - {ui::VKEY_DELETE, ui::DomCode::DEL, ui::EF_NONE, ui::DomKey::DEL, 0x7F}},
|
| + {ui::VKEY_BACK, ui::DomCode::BACKSPACE, ui::EF_COMMAND_DOWN,
|
| + ui::DomKey::BACKSPACE},
|
| + {ui::VKEY_DELETE, ui::DomCode::DEL, ui::EF_NONE, ui::DomKey::DEL}},
|
| // Search+Up -> Prior
|
| {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_UP,
|
| - ui::DomCode::ARROW_UP,
|
| - ui::EF_COMMAND_DOWN,
|
| - ui::DomKey::ARROW_UP,
|
| - 0},
|
| - {ui::VKEY_PRIOR,
|
| - ui::DomCode::PAGE_UP,
|
| - ui::EF_NONE,
|
| - ui::DomKey::PAGE_UP,
|
| - 0}},
|
| + {ui::VKEY_UP, ui::DomCode::ARROW_UP, ui::EF_COMMAND_DOWN,
|
| + ui::DomKey::ARROW_UP},
|
| + {ui::VKEY_PRIOR, ui::DomCode::PAGE_UP, ui::EF_NONE,
|
| + ui::DomKey::PAGE_UP}},
|
| // Search+Down -> Next
|
| {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_DOWN,
|
| - ui::DomCode::ARROW_DOWN,
|
| - ui::EF_COMMAND_DOWN,
|
| - ui::DomKey::ARROW_DOWN,
|
| - 0},
|
| - {ui::VKEY_NEXT,
|
| - ui::DomCode::PAGE_DOWN,
|
| - ui::EF_NONE,
|
| - ui::DomKey::PAGE_DOWN,
|
| - 0}},
|
| + {ui::VKEY_DOWN, ui::DomCode::ARROW_DOWN, ui::EF_COMMAND_DOWN,
|
| + ui::DomKey::ARROW_DOWN},
|
| + {ui::VKEY_NEXT, ui::DomCode::PAGE_DOWN, ui::EF_NONE,
|
| + ui::DomKey::PAGE_DOWN}},
|
| // Search+Left -> Home
|
| {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_LEFT,
|
| - ui::DomCode::ARROW_LEFT,
|
| - ui::EF_COMMAND_DOWN,
|
| - ui::DomKey::ARROW_LEFT,
|
| - 0},
|
| - {ui::VKEY_HOME, ui::DomCode::HOME, ui::EF_NONE, ui::DomKey::HOME, 0}},
|
| + {ui::VKEY_LEFT, ui::DomCode::ARROW_LEFT, ui::EF_COMMAND_DOWN,
|
| + ui::DomKey::ARROW_LEFT},
|
| + {ui::VKEY_HOME, ui::DomCode::HOME, ui::EF_NONE, ui::DomKey::HOME}},
|
| // Control+Search+Left -> Home
|
| {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_LEFT,
|
| - ui::DomCode::ARROW_LEFT,
|
| - ui::EF_COMMAND_DOWN | ui::EF_CONTROL_DOWN,
|
| - ui::DomKey::ARROW_LEFT,
|
| - 0},
|
| - {ui::VKEY_HOME,
|
| - ui::DomCode::HOME,
|
| - ui::EF_CONTROL_DOWN,
|
| - ui::DomKey::HOME,
|
| - 0}},
|
| + {ui::VKEY_LEFT, ui::DomCode::ARROW_LEFT,
|
| + ui::EF_COMMAND_DOWN | ui::EF_CONTROL_DOWN, ui::DomKey::ARROW_LEFT},
|
| + {ui::VKEY_HOME, ui::DomCode::HOME, ui::EF_CONTROL_DOWN,
|
| + ui::DomKey::HOME}},
|
| // Search+Right -> End
|
| {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_RIGHT,
|
| - ui::DomCode::ARROW_RIGHT,
|
| - ui::EF_COMMAND_DOWN,
|
| - ui::DomKey::ARROW_RIGHT,
|
| - 0},
|
| - {ui::VKEY_END, ui::DomCode::END, ui::EF_NONE, ui::DomKey::END, 0}},
|
| + {ui::VKEY_RIGHT, ui::DomCode::ARROW_RIGHT, ui::EF_COMMAND_DOWN,
|
| + ui::DomKey::ARROW_RIGHT},
|
| + {ui::VKEY_END, ui::DomCode::END, ui::EF_NONE, ui::DomKey::END}},
|
| // Control+Search+Right -> End
|
| {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_RIGHT,
|
| - ui::DomCode::ARROW_RIGHT,
|
| - ui::EF_COMMAND_DOWN | ui::EF_CONTROL_DOWN,
|
| - ui::DomKey::ARROW_RIGHT,
|
| - 0},
|
| - {ui::VKEY_END,
|
| - ui::DomCode::END,
|
| - ui::EF_CONTROL_DOWN,
|
| - ui::DomKey::END,
|
| - 0}},
|
| + {ui::VKEY_RIGHT, ui::DomCode::ARROW_RIGHT,
|
| + ui::EF_COMMAND_DOWN | ui::EF_CONTROL_DOWN, ui::DomKey::ARROW_RIGHT},
|
| + {ui::VKEY_END, ui::DomCode::END, ui::EF_CONTROL_DOWN, ui::DomKey::END}},
|
| // Search+Period -> Insert
|
| {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_OEM_PERIOD,
|
| - ui::DomCode::PERIOD,
|
| - ui::EF_COMMAND_DOWN,
|
| - ui::DomKey::CHARACTER,
|
| - '.'},
|
| - {ui::VKEY_INSERT,
|
| - ui::DomCode::INSERT,
|
| - ui::EF_NONE,
|
| - ui::DomKey::INSERT,
|
| - 0}},
|
| + {ui::VKEY_OEM_PERIOD, ui::DomCode::PERIOD, ui::EF_COMMAND_DOWN,
|
| + ui::DomKey::Constant<'.'>::Character},
|
| + {ui::VKEY_INSERT, ui::DomCode::INSERT, ui::EF_NONE, ui::DomKey::INSERT}},
|
| // Control+Search+Period -> Control+Insert
|
| {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_OEM_PERIOD,
|
| - ui::DomCode::PERIOD,
|
| + {ui::VKEY_OEM_PERIOD, ui::DomCode::PERIOD,
|
| ui::EF_COMMAND_DOWN | ui::EF_CONTROL_DOWN,
|
| - ui::DomKey::CHARACTER,
|
| - '.'},
|
| - {ui::VKEY_INSERT,
|
| - ui::DomCode::INSERT,
|
| - ui::EF_CONTROL_DOWN,
|
| - ui::DomKey::INSERT,
|
| - 0}}};
|
| + ui::DomKey::Constant<'.'>::Character},
|
| + {ui::VKEY_INSERT, ui::DomCode::INSERT, ui::EF_CONTROL_DOWN,
|
| + ui::DomKey::INSERT}}};
|
|
|
| for (const auto& test : tests) {
|
| CheckKeyTestCase(&rewriter, test);
|
| @@ -2031,535 +1473,305 @@ TEST_F(EventRewriterTest, TestRewriteFunctionKeys) {
|
| KeyTestCase tests[] = {
|
| // F1 -> Back
|
| {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_F1, ui::DomCode::F1, ui::EF_NONE, ui::DomKey::F1, 0},
|
| - {ui::VKEY_BROWSER_BACK,
|
| - ui::DomCode::BROWSER_BACK,
|
| - ui::EF_NONE,
|
| - ui::DomKey::BROWSER_BACK,
|
| - 0}},
|
| - {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_F1, ui::DomCode::F1, ui::EF_CONTROL_DOWN, ui::DomKey::F1, 0},
|
| - {ui::VKEY_BROWSER_BACK,
|
| - ui::DomCode::BROWSER_BACK,
|
| - ui::EF_CONTROL_DOWN,
|
| - ui::DomKey::BROWSER_BACK,
|
| - 0}},
|
| - {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_F1, ui::DomCode::F1, ui::EF_ALT_DOWN, ui::DomKey::F1, 0},
|
| - {ui::VKEY_BROWSER_BACK,
|
| - ui::DomCode::BROWSER_BACK,
|
| - ui::EF_ALT_DOWN,
|
| - ui::DomKey::BROWSER_BACK,
|
| - 0}},
|
| + {ui::VKEY_F1, ui::DomCode::F1, ui::EF_NONE, ui::DomKey::F1},
|
| + {ui::VKEY_BROWSER_BACK, ui::DomCode::BROWSER_BACK, ui::EF_NONE,
|
| + ui::DomKey::BROWSER_BACK}},
|
| + {ui::ET_KEY_PRESSED,
|
| + {ui::VKEY_F1, ui::DomCode::F1, ui::EF_CONTROL_DOWN, ui::DomKey::F1},
|
| + {ui::VKEY_BROWSER_BACK, ui::DomCode::BROWSER_BACK, ui::EF_CONTROL_DOWN,
|
| + ui::DomKey::BROWSER_BACK}},
|
| + {ui::ET_KEY_PRESSED,
|
| + {ui::VKEY_F1, ui::DomCode::F1, ui::EF_ALT_DOWN, ui::DomKey::F1},
|
| + {ui::VKEY_BROWSER_BACK, ui::DomCode::BROWSER_BACK, ui::EF_ALT_DOWN,
|
| + ui::DomKey::BROWSER_BACK}},
|
| // F2 -> Forward
|
| {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_F2, ui::DomCode::F2, ui::EF_NONE, ui::DomKey::F2, 0},
|
| - {ui::VKEY_BROWSER_FORWARD,
|
| - ui::DomCode::BROWSER_FORWARD,
|
| - ui::EF_NONE,
|
| - ui::DomKey::BROWSER_FORWARD,
|
| - 0}},
|
| - {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_F2, ui::DomCode::F2, ui::EF_CONTROL_DOWN, ui::DomKey::F2, 0},
|
| - {ui::VKEY_BROWSER_FORWARD,
|
| - ui::DomCode::BROWSER_FORWARD,
|
| - ui::EF_CONTROL_DOWN,
|
| - ui::DomKey::BROWSER_FORWARD,
|
| - 0}},
|
| - {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_F2, ui::DomCode::F2, ui::EF_ALT_DOWN, ui::DomKey::F2, 0},
|
| - {ui::VKEY_BROWSER_FORWARD,
|
| - ui::DomCode::BROWSER_FORWARD,
|
| - ui::EF_ALT_DOWN,
|
| - ui::DomKey::BROWSER_FORWARD,
|
| - 0}},
|
| + {ui::VKEY_F2, ui::DomCode::F2, ui::EF_NONE, ui::DomKey::F2},
|
| + {ui::VKEY_BROWSER_FORWARD, ui::DomCode::BROWSER_FORWARD, ui::EF_NONE,
|
| + ui::DomKey::BROWSER_FORWARD}},
|
| + {ui::ET_KEY_PRESSED,
|
| + {ui::VKEY_F2, ui::DomCode::F2, ui::EF_CONTROL_DOWN, ui::DomKey::F2},
|
| + {ui::VKEY_BROWSER_FORWARD, ui::DomCode::BROWSER_FORWARD,
|
| + ui::EF_CONTROL_DOWN, ui::DomKey::BROWSER_FORWARD}},
|
| + {ui::ET_KEY_PRESSED,
|
| + {ui::VKEY_F2, ui::DomCode::F2, ui::EF_ALT_DOWN, ui::DomKey::F2},
|
| + {ui::VKEY_BROWSER_FORWARD, ui::DomCode::BROWSER_FORWARD, ui::EF_ALT_DOWN,
|
| + ui::DomKey::BROWSER_FORWARD}},
|
| // F3 -> Refresh
|
| {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_F3, ui::DomCode::F3, ui::EF_NONE, ui::DomKey::F3, 0},
|
| - {ui::VKEY_BROWSER_REFRESH,
|
| - ui::DomCode::BROWSER_REFRESH,
|
| - ui::EF_NONE,
|
| - ui::DomKey::BROWSER_REFRESH,
|
| - 0}},
|
| - {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_F3, ui::DomCode::F3, ui::EF_CONTROL_DOWN, ui::DomKey::F3, 0},
|
| - {ui::VKEY_BROWSER_REFRESH,
|
| - ui::DomCode::BROWSER_REFRESH,
|
| - ui::EF_CONTROL_DOWN,
|
| - ui::DomKey::BROWSER_REFRESH,
|
| - 0}},
|
| - {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_F3, ui::DomCode::F3, ui::EF_ALT_DOWN, ui::DomKey::F3, 0},
|
| - {ui::VKEY_BROWSER_REFRESH,
|
| - ui::DomCode::BROWSER_REFRESH,
|
| - ui::EF_ALT_DOWN,
|
| - ui::DomKey::BROWSER_REFRESH,
|
| - 0}},
|
| + {ui::VKEY_F3, ui::DomCode::F3, ui::EF_NONE, ui::DomKey::F3},
|
| + {ui::VKEY_BROWSER_REFRESH, ui::DomCode::BROWSER_REFRESH, ui::EF_NONE,
|
| + ui::DomKey::BROWSER_REFRESH}},
|
| + {ui::ET_KEY_PRESSED,
|
| + {ui::VKEY_F3, ui::DomCode::F3, ui::EF_CONTROL_DOWN, ui::DomKey::F3},
|
| + {ui::VKEY_BROWSER_REFRESH, ui::DomCode::BROWSER_REFRESH,
|
| + ui::EF_CONTROL_DOWN, ui::DomKey::BROWSER_REFRESH}},
|
| + {ui::ET_KEY_PRESSED,
|
| + {ui::VKEY_F3, ui::DomCode::F3, ui::EF_ALT_DOWN, ui::DomKey::F3},
|
| + {ui::VKEY_BROWSER_REFRESH, ui::DomCode::BROWSER_REFRESH, ui::EF_ALT_DOWN,
|
| + ui::DomKey::BROWSER_REFRESH}},
|
| // F4 -> Launch App 2
|
| {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_F4, ui::DomCode::F4, ui::EF_NONE, ui::DomKey::F4, 0},
|
| - {ui::VKEY_MEDIA_LAUNCH_APP2,
|
| - ui::DomCode::ZOOM_TOGGLE,
|
| - ui::EF_NONE,
|
| - ui::DomKey::ZOOM_TOGGLE,
|
| - 0}},
|
| - {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_F4, ui::DomCode::F4, ui::EF_CONTROL_DOWN, ui::DomKey::F4, 0},
|
| - {ui::VKEY_MEDIA_LAUNCH_APP2,
|
| - ui::DomCode::ZOOM_TOGGLE,
|
| - ui::EF_CONTROL_DOWN,
|
| - ui::DomKey::ZOOM_TOGGLE,
|
| - 0}},
|
| - {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_F4, ui::DomCode::F4, ui::EF_ALT_DOWN, ui::DomKey::F4, 0},
|
| - {ui::VKEY_MEDIA_LAUNCH_APP2,
|
| - ui::DomCode::ZOOM_TOGGLE,
|
| - ui::EF_ALT_DOWN,
|
| - ui::DomKey::ZOOM_TOGGLE,
|
| - 0}},
|
| + {ui::VKEY_F4, ui::DomCode::F4, ui::EF_NONE, ui::DomKey::F4},
|
| + {ui::VKEY_MEDIA_LAUNCH_APP2, ui::DomCode::ZOOM_TOGGLE, ui::EF_NONE,
|
| + ui::DomKey::ZOOM_TOGGLE}},
|
| + {ui::ET_KEY_PRESSED,
|
| + {ui::VKEY_F4, ui::DomCode::F4, ui::EF_CONTROL_DOWN, ui::DomKey::F4},
|
| + {ui::VKEY_MEDIA_LAUNCH_APP2, ui::DomCode::ZOOM_TOGGLE,
|
| + ui::EF_CONTROL_DOWN, ui::DomKey::ZOOM_TOGGLE}},
|
| + {ui::ET_KEY_PRESSED,
|
| + {ui::VKEY_F4, ui::DomCode::F4, ui::EF_ALT_DOWN, ui::DomKey::F4},
|
| + {ui::VKEY_MEDIA_LAUNCH_APP2, ui::DomCode::ZOOM_TOGGLE, ui::EF_ALT_DOWN,
|
| + ui::DomKey::ZOOM_TOGGLE}},
|
| // F5 -> Launch App 1
|
| {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_F5, ui::DomCode::F5, ui::EF_NONE, ui::DomKey::F5, 0},
|
| - {ui::VKEY_MEDIA_LAUNCH_APP1,
|
| - ui::DomCode::SELECT_TASK,
|
| - ui::EF_NONE,
|
| - ui::DomKey::LAUNCH_MY_COMPUTER,
|
| - 0}},
|
| - {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_F5, ui::DomCode::F5, ui::EF_CONTROL_DOWN, ui::DomKey::F5, 0},
|
| - {ui::VKEY_MEDIA_LAUNCH_APP1,
|
| - ui::DomCode::SELECT_TASK,
|
| - ui::EF_CONTROL_DOWN,
|
| - ui::DomKey::LAUNCH_MY_COMPUTER,
|
| - 0}},
|
| - {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_F5, ui::DomCode::F5, ui::EF_ALT_DOWN, ui::DomKey::F5, 0},
|
| - {ui::VKEY_MEDIA_LAUNCH_APP1,
|
| - ui::DomCode::SELECT_TASK,
|
| - ui::EF_ALT_DOWN,
|
| - ui::DomKey::LAUNCH_MY_COMPUTER,
|
| - 0}},
|
| + {ui::VKEY_F5, ui::DomCode::F5, ui::EF_NONE, ui::DomKey::F5},
|
| + {ui::VKEY_MEDIA_LAUNCH_APP1, ui::DomCode::SELECT_TASK, ui::EF_NONE,
|
| + ui::DomKey::LAUNCH_MY_COMPUTER}},
|
| + {ui::ET_KEY_PRESSED,
|
| + {ui::VKEY_F5, ui::DomCode::F5, ui::EF_CONTROL_DOWN, ui::DomKey::F5},
|
| + {ui::VKEY_MEDIA_LAUNCH_APP1, ui::DomCode::SELECT_TASK,
|
| + ui::EF_CONTROL_DOWN, ui::DomKey::LAUNCH_MY_COMPUTER}},
|
| + {ui::ET_KEY_PRESSED,
|
| + {ui::VKEY_F5, ui::DomCode::F5, ui::EF_ALT_DOWN, ui::DomKey::F5},
|
| + {ui::VKEY_MEDIA_LAUNCH_APP1, ui::DomCode::SELECT_TASK, ui::EF_ALT_DOWN,
|
| + ui::DomKey::LAUNCH_MY_COMPUTER}},
|
| // F6 -> Brightness down
|
| {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_F6, ui::DomCode::F6, ui::EF_NONE, ui::DomKey::F6, 0},
|
| - {ui::VKEY_BRIGHTNESS_DOWN,
|
| - ui::DomCode::BRIGHTNESS_DOWN,
|
| - ui::EF_NONE,
|
| - ui::DomKey::BRIGHTNESS_DOWN,
|
| - 0}},
|
| - {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_F6, ui::DomCode::F6, ui::EF_CONTROL_DOWN, ui::DomKey::F6, 0},
|
| - {ui::VKEY_BRIGHTNESS_DOWN,
|
| - ui::DomCode::BRIGHTNESS_DOWN,
|
| - ui::EF_CONTROL_DOWN,
|
| - ui::DomKey::BRIGHTNESS_DOWN,
|
| - 0}},
|
| - {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_F6, ui::DomCode::F6, ui::EF_ALT_DOWN, ui::DomKey::F6, 0},
|
| - {ui::VKEY_BRIGHTNESS_DOWN,
|
| - ui::DomCode::BRIGHTNESS_DOWN,
|
| - ui::EF_ALT_DOWN,
|
| - ui::DomKey::BRIGHTNESS_DOWN,
|
| - 0}},
|
| + {ui::VKEY_F6, ui::DomCode::F6, ui::EF_NONE, ui::DomKey::F6},
|
| + {ui::VKEY_BRIGHTNESS_DOWN, ui::DomCode::BRIGHTNESS_DOWN, ui::EF_NONE,
|
| + ui::DomKey::BRIGHTNESS_DOWN}},
|
| + {ui::ET_KEY_PRESSED,
|
| + {ui::VKEY_F6, ui::DomCode::F6, ui::EF_CONTROL_DOWN, ui::DomKey::F6},
|
| + {ui::VKEY_BRIGHTNESS_DOWN, ui::DomCode::BRIGHTNESS_DOWN,
|
| + ui::EF_CONTROL_DOWN, ui::DomKey::BRIGHTNESS_DOWN}},
|
| + {ui::ET_KEY_PRESSED,
|
| + {ui::VKEY_F6, ui::DomCode::F6, ui::EF_ALT_DOWN, ui::DomKey::F6},
|
| + {ui::VKEY_BRIGHTNESS_DOWN, ui::DomCode::BRIGHTNESS_DOWN, ui::EF_ALT_DOWN,
|
| + ui::DomKey::BRIGHTNESS_DOWN}},
|
| // F7 -> Brightness up
|
| {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_F7, ui::DomCode::F7, ui::EF_NONE, ui::DomKey::F7, 0},
|
| - {ui::VKEY_BRIGHTNESS_UP,
|
| - ui::DomCode::BRIGHTNESS_UP,
|
| - ui::EF_NONE,
|
| - ui::DomKey::BRIGHTNESS_UP,
|
| - 0}},
|
| - {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_F7, ui::DomCode::F7, ui::EF_CONTROL_DOWN, ui::DomKey::F7, 0},
|
| - {ui::VKEY_BRIGHTNESS_UP,
|
| - ui::DomCode::BRIGHTNESS_UP,
|
| - ui::EF_CONTROL_DOWN,
|
| - ui::DomKey::BRIGHTNESS_UP,
|
| - 0}},
|
| - {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_F7, ui::DomCode::F7, ui::EF_ALT_DOWN, ui::DomKey::F7, 0},
|
| - {ui::VKEY_BRIGHTNESS_UP,
|
| - ui::DomCode::BRIGHTNESS_UP,
|
| - ui::EF_ALT_DOWN,
|
| - ui::DomKey::BRIGHTNESS_UP,
|
| - 0}},
|
| + {ui::VKEY_F7, ui::DomCode::F7, ui::EF_NONE, ui::DomKey::F7},
|
| + {ui::VKEY_BRIGHTNESS_UP, ui::DomCode::BRIGHTNESS_UP, ui::EF_NONE,
|
| + ui::DomKey::BRIGHTNESS_UP}},
|
| + {ui::ET_KEY_PRESSED,
|
| + {ui::VKEY_F7, ui::DomCode::F7, ui::EF_CONTROL_DOWN, ui::DomKey::F7},
|
| + {ui::VKEY_BRIGHTNESS_UP, ui::DomCode::BRIGHTNESS_UP, ui::EF_CONTROL_DOWN,
|
| + ui::DomKey::BRIGHTNESS_UP}},
|
| + {ui::ET_KEY_PRESSED,
|
| + {ui::VKEY_F7, ui::DomCode::F7, ui::EF_ALT_DOWN, ui::DomKey::F7},
|
| + {ui::VKEY_BRIGHTNESS_UP, ui::DomCode::BRIGHTNESS_UP, ui::EF_ALT_DOWN,
|
| + ui::DomKey::BRIGHTNESS_UP}},
|
| // F8 -> Volume Mute
|
| {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_F8, ui::DomCode::F8, ui::EF_NONE, ui::DomKey::F8, 0},
|
| - {ui::VKEY_VOLUME_MUTE,
|
| - ui::DomCode::VOLUME_MUTE,
|
| - ui::EF_NONE,
|
| - ui::DomKey::VOLUME_MUTE,
|
| - 0}},
|
| - {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_F8, ui::DomCode::F8, ui::EF_CONTROL_DOWN, ui::DomKey::F8, 0},
|
| - {ui::VKEY_VOLUME_MUTE,
|
| - ui::DomCode::VOLUME_MUTE,
|
| - ui::EF_CONTROL_DOWN,
|
| - ui::DomKey::VOLUME_MUTE,
|
| - 0}},
|
| - {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_F8, ui::DomCode::F8, ui::EF_ALT_DOWN, ui::DomKey::F8, 0},
|
| - {ui::VKEY_VOLUME_MUTE,
|
| - ui::DomCode::VOLUME_MUTE,
|
| - ui::EF_ALT_DOWN,
|
| - ui::DomKey::VOLUME_MUTE,
|
| - 0}},
|
| + {ui::VKEY_F8, ui::DomCode::F8, ui::EF_NONE, ui::DomKey::F8},
|
| + {ui::VKEY_VOLUME_MUTE, ui::DomCode::VOLUME_MUTE, ui::EF_NONE,
|
| + ui::DomKey::VOLUME_MUTE}},
|
| + {ui::ET_KEY_PRESSED,
|
| + {ui::VKEY_F8, ui::DomCode::F8, ui::EF_CONTROL_DOWN, ui::DomKey::F8},
|
| + {ui::VKEY_VOLUME_MUTE, ui::DomCode::VOLUME_MUTE, ui::EF_CONTROL_DOWN,
|
| + ui::DomKey::VOLUME_MUTE}},
|
| + {ui::ET_KEY_PRESSED,
|
| + {ui::VKEY_F8, ui::DomCode::F8, ui::EF_ALT_DOWN, ui::DomKey::F8},
|
| + {ui::VKEY_VOLUME_MUTE, ui::DomCode::VOLUME_MUTE, ui::EF_ALT_DOWN,
|
| + ui::DomKey::VOLUME_MUTE}},
|
| // F9 -> Volume Down
|
| {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_F9, ui::DomCode::F9, ui::EF_NONE, ui::DomKey::F9, 0},
|
| - {ui::VKEY_VOLUME_DOWN,
|
| - ui::DomCode::VOLUME_DOWN,
|
| - ui::EF_NONE,
|
| - ui::DomKey::VOLUME_DOWN,
|
| - 0}},
|
| - {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_F9, ui::DomCode::F9, ui::EF_CONTROL_DOWN, ui::DomKey::F9, 0},
|
| - {ui::VKEY_VOLUME_DOWN,
|
| - ui::DomCode::VOLUME_DOWN,
|
| - ui::EF_CONTROL_DOWN,
|
| - ui::DomKey::VOLUME_DOWN,
|
| - 0}},
|
| - {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_F9, ui::DomCode::F9, ui::EF_ALT_DOWN, ui::DomKey::F9, 0},
|
| - {ui::VKEY_VOLUME_DOWN,
|
| - ui::DomCode::VOLUME_DOWN,
|
| - ui::EF_ALT_DOWN,
|
| - ui::DomKey::VOLUME_DOWN,
|
| - 0}},
|
| + {ui::VKEY_F9, ui::DomCode::F9, ui::EF_NONE, ui::DomKey::F9},
|
| + {ui::VKEY_VOLUME_DOWN, ui::DomCode::VOLUME_DOWN, ui::EF_NONE,
|
| + ui::DomKey::VOLUME_DOWN}},
|
| + {ui::ET_KEY_PRESSED,
|
| + {ui::VKEY_F9, ui::DomCode::F9, ui::EF_CONTROL_DOWN, ui::DomKey::F9},
|
| + {ui::VKEY_VOLUME_DOWN, ui::DomCode::VOLUME_DOWN, ui::EF_CONTROL_DOWN,
|
| + ui::DomKey::VOLUME_DOWN}},
|
| + {ui::ET_KEY_PRESSED,
|
| + {ui::VKEY_F9, ui::DomCode::F9, ui::EF_ALT_DOWN, ui::DomKey::F9},
|
| + {ui::VKEY_VOLUME_DOWN, ui::DomCode::VOLUME_DOWN, ui::EF_ALT_DOWN,
|
| + ui::DomKey::VOLUME_DOWN}},
|
| // F10 -> Volume Up
|
| {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_F10, ui::DomCode::F10, ui::EF_NONE, ui::DomKey::F10, 0},
|
| - {ui::VKEY_VOLUME_UP,
|
| - ui::DomCode::VOLUME_UP,
|
| - ui::EF_NONE,
|
| - ui::DomKey::VOLUME_UP,
|
| - 0}},
|
| - {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_F10,
|
| - ui::DomCode::F10,
|
| - ui::EF_CONTROL_DOWN,
|
| - ui::DomKey::F10,
|
| - 0},
|
| - {ui::VKEY_VOLUME_UP,
|
| - ui::DomCode::VOLUME_UP,
|
| - ui::EF_CONTROL_DOWN,
|
| - ui::DomKey::VOLUME_UP,
|
| - 0}},
|
| - {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_F10, ui::DomCode::F10, ui::EF_ALT_DOWN, ui::DomKey::F10, 0},
|
| - {ui::VKEY_VOLUME_UP,
|
| - ui::DomCode::VOLUME_UP,
|
| - ui::EF_ALT_DOWN,
|
| - ui::DomKey::VOLUME_UP,
|
| - 0}},
|
| + {ui::VKEY_F10, ui::DomCode::F10, ui::EF_NONE, ui::DomKey::F10},
|
| + {ui::VKEY_VOLUME_UP, ui::DomCode::VOLUME_UP, ui::EF_NONE,
|
| + ui::DomKey::VOLUME_UP}},
|
| + {ui::ET_KEY_PRESSED,
|
| + {ui::VKEY_F10, ui::DomCode::F10, ui::EF_CONTROL_DOWN, ui::DomKey::F10},
|
| + {ui::VKEY_VOLUME_UP, ui::DomCode::VOLUME_UP, ui::EF_CONTROL_DOWN,
|
| + ui::DomKey::VOLUME_UP}},
|
| + {ui::ET_KEY_PRESSED,
|
| + {ui::VKEY_F10, ui::DomCode::F10, ui::EF_ALT_DOWN, ui::DomKey::F10},
|
| + {ui::VKEY_VOLUME_UP, ui::DomCode::VOLUME_UP, ui::EF_ALT_DOWN,
|
| + ui::DomKey::VOLUME_UP}},
|
| // F11 -> F11
|
| {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_F11, ui::DomCode::F11, ui::EF_NONE, ui::DomKey::F11, 0},
|
| - {ui::VKEY_F11, ui::DomCode::F11, ui::EF_NONE, ui::DomKey::F11, 0}},
|
| - {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_F11,
|
| - ui::DomCode::F11,
|
| - ui::EF_CONTROL_DOWN,
|
| - ui::DomKey::F11,
|
| - 0},
|
| - {ui::VKEY_F11,
|
| - ui::DomCode::F11,
|
| - ui::EF_CONTROL_DOWN,
|
| - ui::DomKey::F11,
|
| - 0}},
|
| - {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_F11, ui::DomCode::F11, ui::EF_ALT_DOWN, ui::DomKey::F11, 0},
|
| - {ui::VKEY_F11, ui::DomCode::F11, ui::EF_ALT_DOWN, ui::DomKey::F11, 0}},
|
| + {ui::VKEY_F11, ui::DomCode::F11, ui::EF_NONE, ui::DomKey::F11},
|
| + {ui::VKEY_F11, ui::DomCode::F11, ui::EF_NONE, ui::DomKey::F11}},
|
| + {ui::ET_KEY_PRESSED,
|
| + {ui::VKEY_F11, ui::DomCode::F11, ui::EF_CONTROL_DOWN, ui::DomKey::F11},
|
| + {ui::VKEY_F11, ui::DomCode::F11, ui::EF_CONTROL_DOWN, ui::DomKey::F11}},
|
| + {ui::ET_KEY_PRESSED,
|
| + {ui::VKEY_F11, ui::DomCode::F11, ui::EF_ALT_DOWN, ui::DomKey::F11},
|
| + {ui::VKEY_F11, ui::DomCode::F11, ui::EF_ALT_DOWN, ui::DomKey::F11}},
|
| // F12 -> F12
|
| {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_F12, ui::DomCode::F12, ui::EF_NONE, ui::DomKey::F12, 0},
|
| - {ui::VKEY_F12, ui::DomCode::F12, ui::EF_NONE, ui::DomKey::F12, 0}},
|
| + {ui::VKEY_F12, ui::DomCode::F12, ui::EF_NONE, ui::DomKey::F12},
|
| + {ui::VKEY_F12, ui::DomCode::F12, ui::EF_NONE, ui::DomKey::F12}},
|
| {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_F12,
|
| - ui::DomCode::F12,
|
| - ui::EF_CONTROL_DOWN,
|
| - ui::DomKey::F12,
|
| - 0},
|
| - {ui::VKEY_F12,
|
| - ui::DomCode::F12,
|
| - ui::EF_CONTROL_DOWN,
|
| - ui::DomKey::F12,
|
| - 0}},
|
| + {ui::VKEY_F12, ui::DomCode::F12, ui::EF_CONTROL_DOWN, ui::DomKey::F12},
|
| + {ui::VKEY_F12, ui::DomCode::F12, ui::EF_CONTROL_DOWN, ui::DomKey::F12}},
|
| {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_F12, ui::DomCode::F12, ui::EF_ALT_DOWN, ui::DomKey::F12, 0},
|
| - {ui::VKEY_F12, ui::DomCode::F12, ui::EF_ALT_DOWN, ui::DomKey::F12, 0}},
|
| + {ui::VKEY_F12, ui::DomCode::F12, ui::EF_ALT_DOWN, ui::DomKey::F12},
|
| + {ui::VKEY_F12, ui::DomCode::F12, ui::EF_ALT_DOWN, ui::DomKey::F12}},
|
|
|
| // The number row should not be rewritten without Search key.
|
| {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_1,
|
| - ui::DomCode::DIGIT1,
|
| - ui::EF_NONE,
|
| - ui::DomKey::CHARACTER,
|
| - '1'},
|
| - {ui::VKEY_1,
|
| - ui::DomCode::DIGIT1,
|
| - ui::EF_NONE,
|
| - ui::DomKey::CHARACTER,
|
| - '1'}},
|
| - {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_2,
|
| - ui::DomCode::DIGIT2,
|
| - ui::EF_NONE,
|
| - ui::DomKey::CHARACTER,
|
| - '2'},
|
| - {ui::VKEY_2,
|
| - ui::DomCode::DIGIT2,
|
| - ui::EF_NONE,
|
| - ui::DomKey::CHARACTER,
|
| - '2'}},
|
| - {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_3,
|
| - ui::DomCode::DIGIT3,
|
| - ui::EF_NONE,
|
| - ui::DomKey::CHARACTER,
|
| - '3'},
|
| - {ui::VKEY_3,
|
| - ui::DomCode::DIGIT3,
|
| - ui::EF_NONE,
|
| - ui::DomKey::CHARACTER,
|
| - '3'}},
|
| - {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_4,
|
| - ui::DomCode::DIGIT4,
|
| - ui::EF_NONE,
|
| - ui::DomKey::CHARACTER,
|
| - '4'},
|
| - {ui::VKEY_4,
|
| - ui::DomCode::DIGIT4,
|
| - ui::EF_NONE,
|
| - ui::DomKey::CHARACTER,
|
| - '4'}},
|
| - {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_5,
|
| - ui::DomCode::DIGIT5,
|
| - ui::EF_NONE,
|
| - ui::DomKey::CHARACTER,
|
| - '5'},
|
| - {ui::VKEY_5,
|
| - ui::DomCode::DIGIT5,
|
| - ui::EF_NONE,
|
| - ui::DomKey::CHARACTER,
|
| - '5'}},
|
| - {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_6,
|
| - ui::DomCode::DIGIT6,
|
| - ui::EF_NONE,
|
| - ui::DomKey::CHARACTER,
|
| - '6'},
|
| - {ui::VKEY_6,
|
| - ui::DomCode::DIGIT6,
|
| - ui::EF_NONE,
|
| - ui::DomKey::CHARACTER,
|
| - '6'}},
|
| - {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_7,
|
| - ui::DomCode::DIGIT7,
|
| - ui::EF_NONE,
|
| - ui::DomKey::CHARACTER,
|
| - '7'},
|
| - {ui::VKEY_7,
|
| - ui::DomCode::DIGIT7,
|
| - ui::EF_NONE,
|
| - ui::DomKey::CHARACTER,
|
| - '7'}},
|
| - {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_8,
|
| - ui::DomCode::DIGIT8,
|
| - ui::EF_NONE,
|
| - ui::DomKey::CHARACTER,
|
| - '8'},
|
| - {ui::VKEY_8,
|
| - ui::DomCode::DIGIT8,
|
| - ui::EF_NONE,
|
| - ui::DomKey::CHARACTER,
|
| - '8'}},
|
| - {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_9,
|
| - ui::DomCode::DIGIT9,
|
| - ui::EF_NONE,
|
| - ui::DomKey::CHARACTER,
|
| - '9'},
|
| - {ui::VKEY_9,
|
| - ui::DomCode::DIGIT9,
|
| - ui::EF_NONE,
|
| - ui::DomKey::CHARACTER,
|
| - '9'}},
|
| - {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_0,
|
| - ui::DomCode::DIGIT0,
|
| - ui::EF_NONE,
|
| - ui::DomKey::CHARACTER,
|
| - '0'},
|
| - {ui::VKEY_0,
|
| - ui::DomCode::DIGIT0,
|
| - ui::EF_NONE,
|
| - ui::DomKey::CHARACTER,
|
| - '0'}},
|
| - {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_OEM_MINUS,
|
| - ui::DomCode::MINUS,
|
| - ui::EF_NONE,
|
| - ui::DomKey::CHARACTER,
|
| - '-'},
|
| - {ui::VKEY_OEM_MINUS,
|
| - ui::DomCode::MINUS,
|
| - ui::EF_NONE,
|
| - ui::DomKey::CHARACTER,
|
| - '-'}},
|
| - {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_OEM_PLUS,
|
| - ui::DomCode::EQUAL,
|
| - ui::EF_NONE,
|
| - ui::DomKey::CHARACTER,
|
| - '='},
|
| - {ui::VKEY_OEM_PLUS,
|
| - ui::DomCode::EQUAL,
|
| - ui::EF_NONE,
|
| - ui::DomKey::CHARACTER,
|
| - '='}},
|
| + {ui::VKEY_1, ui::DomCode::DIGIT1, ui::EF_NONE,
|
| + ui::DomKey::Constant<'1'>::Character},
|
| + {ui::VKEY_1, ui::DomCode::DIGIT1, ui::EF_NONE,
|
| + ui::DomKey::Constant<'1'>::Character}},
|
| + {ui::ET_KEY_PRESSED,
|
| + {ui::VKEY_2, ui::DomCode::DIGIT2, ui::EF_NONE,
|
| + ui::DomKey::Constant<'2'>::Character},
|
| + {ui::VKEY_2, ui::DomCode::DIGIT2, ui::EF_NONE,
|
| + ui::DomKey::Constant<'2'>::Character}},
|
| + {ui::ET_KEY_PRESSED,
|
| + {ui::VKEY_3, ui::DomCode::DIGIT3, ui::EF_NONE,
|
| + ui::DomKey::Constant<'3'>::Character},
|
| + {ui::VKEY_3, ui::DomCode::DIGIT3, ui::EF_NONE,
|
| + ui::DomKey::Constant<'3'>::Character}},
|
| + {ui::ET_KEY_PRESSED,
|
| + {ui::VKEY_4, ui::DomCode::DIGIT4, ui::EF_NONE,
|
| + ui::DomKey::Constant<'4'>::Character},
|
| + {ui::VKEY_4, ui::DomCode::DIGIT4, ui::EF_NONE,
|
| + ui::DomKey::Constant<'4'>::Character}},
|
| + {ui::ET_KEY_PRESSED,
|
| + {ui::VKEY_5, ui::DomCode::DIGIT5, ui::EF_NONE,
|
| + ui::DomKey::Constant<'5'>::Character},
|
| + {ui::VKEY_5, ui::DomCode::DIGIT5, ui::EF_NONE,
|
| + ui::DomKey::Constant<'5'>::Character}},
|
| + {ui::ET_KEY_PRESSED,
|
| + {ui::VKEY_6, ui::DomCode::DIGIT6, ui::EF_NONE,
|
| + ui::DomKey::Constant<'6'>::Character},
|
| + {ui::VKEY_6, ui::DomCode::DIGIT6, ui::EF_NONE,
|
| + ui::DomKey::Constant<'6'>::Character}},
|
| + {ui::ET_KEY_PRESSED,
|
| + {ui::VKEY_7, ui::DomCode::DIGIT7, ui::EF_NONE,
|
| + ui::DomKey::Constant<'7'>::Character},
|
| + {ui::VKEY_7, ui::DomCode::DIGIT7, ui::EF_NONE,
|
| + ui::DomKey::Constant<'7'>::Character}},
|
| + {ui::ET_KEY_PRESSED,
|
| + {ui::VKEY_8, ui::DomCode::DIGIT8, ui::EF_NONE,
|
| + ui::DomKey::Constant<'8'>::Character},
|
| + {ui::VKEY_8, ui::DomCode::DIGIT8, ui::EF_NONE,
|
| + ui::DomKey::Constant<'8'>::Character}},
|
| + {ui::ET_KEY_PRESSED,
|
| + {ui::VKEY_9, ui::DomCode::DIGIT9, ui::EF_NONE,
|
| + ui::DomKey::Constant<'9'>::Character},
|
| + {ui::VKEY_9, ui::DomCode::DIGIT9, ui::EF_NONE,
|
| + ui::DomKey::Constant<'9'>::Character}},
|
| + {ui::ET_KEY_PRESSED,
|
| + {ui::VKEY_0, ui::DomCode::DIGIT0, ui::EF_NONE,
|
| + ui::DomKey::Constant<'0'>::Character},
|
| + {ui::VKEY_0, ui::DomCode::DIGIT0, ui::EF_NONE,
|
| + ui::DomKey::Constant<'0'>::Character}},
|
| + {ui::ET_KEY_PRESSED,
|
| + {ui::VKEY_OEM_MINUS, ui::DomCode::MINUS, ui::EF_NONE,
|
| + ui::DomKey::Constant<'-'>::Character},
|
| + {ui::VKEY_OEM_MINUS, ui::DomCode::MINUS, ui::EF_NONE,
|
| + ui::DomKey::Constant<'-'>::Character}},
|
| + {ui::ET_KEY_PRESSED,
|
| + {ui::VKEY_OEM_PLUS, ui::DomCode::EQUAL, ui::EF_NONE,
|
| + ui::DomKey::Constant<'='>::Character},
|
| + {ui::VKEY_OEM_PLUS, ui::DomCode::EQUAL, ui::EF_NONE,
|
| + ui::DomKey::Constant<'='>::Character}},
|
|
|
| // The number row should be rewritten as the F<number> row with Search
|
| // key.
|
| {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_1,
|
| - ui::DomCode::DIGIT1,
|
| - ui::EF_COMMAND_DOWN,
|
| - ui::DomKey::CHARACTER,
|
| - '1'},
|
| - {ui::VKEY_F1, ui::DomCode::F1, ui::EF_NONE, ui::DomKey::F1, 0}},
|
| - {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_2,
|
| - ui::DomCode::DIGIT2,
|
| - ui::EF_COMMAND_DOWN,
|
| - ui::DomKey::CHARACTER,
|
| - '2'},
|
| - {ui::VKEY_F2, ui::DomCode::F2, ui::EF_NONE, ui::DomKey::F2, 0}},
|
| - {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_3,
|
| - ui::DomCode::DIGIT3,
|
| - ui::EF_COMMAND_DOWN,
|
| - ui::DomKey::CHARACTER,
|
| - '3'},
|
| - {ui::VKEY_F3, ui::DomCode::F3, ui::EF_NONE, ui::DomKey::F3, 0}},
|
| - {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_4,
|
| - ui::DomCode::DIGIT4,
|
| - ui::EF_COMMAND_DOWN,
|
| - ui::DomKey::CHARACTER,
|
| - '4'},
|
| - {ui::VKEY_F4, ui::DomCode::F4, ui::EF_NONE, ui::DomKey::F4, 0}},
|
| - {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_5,
|
| - ui::DomCode::DIGIT5,
|
| - ui::EF_COMMAND_DOWN,
|
| - ui::DomKey::CHARACTER,
|
| - '5'},
|
| - {ui::VKEY_F5, ui::DomCode::F5, ui::EF_NONE, ui::DomKey::F5, 0}},
|
| - {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_6,
|
| - ui::DomCode::DIGIT6,
|
| - ui::EF_COMMAND_DOWN,
|
| - ui::DomKey::CHARACTER,
|
| - '6'},
|
| - {ui::VKEY_F6, ui::DomCode::F6, ui::EF_NONE, ui::DomKey::F6, 0}},
|
| - {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_7,
|
| - ui::DomCode::DIGIT7,
|
| - ui::EF_COMMAND_DOWN,
|
| - ui::DomKey::CHARACTER,
|
| - '7'},
|
| - {ui::VKEY_F7, ui::DomCode::F7, ui::EF_NONE, ui::DomKey::F7, 0}},
|
| - {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_8,
|
| - ui::DomCode::DIGIT8,
|
| - ui::EF_COMMAND_DOWN,
|
| - ui::DomKey::CHARACTER,
|
| - '8'},
|
| - {ui::VKEY_F8, ui::DomCode::F8, ui::EF_NONE, ui::DomKey::F8, 0}},
|
| - {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_9,
|
| - ui::DomCode::DIGIT9,
|
| - ui::EF_COMMAND_DOWN,
|
| - ui::DomKey::CHARACTER,
|
| - '9'},
|
| - {ui::VKEY_F9, ui::DomCode::F9, ui::EF_NONE, ui::DomKey::F9, 0}},
|
| - {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_0,
|
| - ui::DomCode::DIGIT0,
|
| - ui::EF_COMMAND_DOWN,
|
| - ui::DomKey::CHARACTER,
|
| - '0'},
|
| - {ui::VKEY_F10, ui::DomCode::F10, ui::EF_NONE, ui::DomKey::F10, 0}},
|
| - {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_OEM_MINUS,
|
| - ui::DomCode::MINUS,
|
| - ui::EF_COMMAND_DOWN,
|
| - ui::DomKey::CHARACTER,
|
| - '-'},
|
| - {ui::VKEY_F11, ui::DomCode::F11, ui::EF_NONE, ui::DomKey::F11, 0}},
|
| - {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_OEM_PLUS,
|
| - ui::DomCode::EQUAL,
|
| - ui::EF_COMMAND_DOWN,
|
| - ui::DomKey::CHARACTER,
|
| - '='},
|
| - {ui::VKEY_F12, ui::DomCode::F12, ui::EF_NONE, ui::DomKey::F12, 0}},
|
| + {ui::VKEY_1, ui::DomCode::DIGIT1, ui::EF_COMMAND_DOWN,
|
| + ui::DomKey::Constant<'1'>::Character},
|
| + {ui::VKEY_F1, ui::DomCode::F1, ui::EF_NONE, ui::DomKey::F1}},
|
| + {ui::ET_KEY_PRESSED,
|
| + {ui::VKEY_2, ui::DomCode::DIGIT2, ui::EF_COMMAND_DOWN,
|
| + ui::DomKey::Constant<'2'>::Character},
|
| + {ui::VKEY_F2, ui::DomCode::F2, ui::EF_NONE, ui::DomKey::F2}},
|
| + {ui::ET_KEY_PRESSED,
|
| + {ui::VKEY_3, ui::DomCode::DIGIT3, ui::EF_COMMAND_DOWN,
|
| + ui::DomKey::Constant<'3'>::Character},
|
| + {ui::VKEY_F3, ui::DomCode::F3, ui::EF_NONE, ui::DomKey::F3}},
|
| + {ui::ET_KEY_PRESSED,
|
| + {ui::VKEY_4, ui::DomCode::DIGIT4, ui::EF_COMMAND_DOWN,
|
| + ui::DomKey::Constant<'4'>::Character},
|
| + {ui::VKEY_F4, ui::DomCode::F4, ui::EF_NONE, ui::DomKey::F4}},
|
| + {ui::ET_KEY_PRESSED,
|
| + {ui::VKEY_5, ui::DomCode::DIGIT5, ui::EF_COMMAND_DOWN,
|
| + ui::DomKey::Constant<'5'>::Character},
|
| + {ui::VKEY_F5, ui::DomCode::F5, ui::EF_NONE, ui::DomKey::F5}},
|
| + {ui::ET_KEY_PRESSED,
|
| + {ui::VKEY_6, ui::DomCode::DIGIT6, ui::EF_COMMAND_DOWN,
|
| + ui::DomKey::Constant<'6'>::Character},
|
| + {ui::VKEY_F6, ui::DomCode::F6, ui::EF_NONE, ui::DomKey::F6}},
|
| + {ui::ET_KEY_PRESSED,
|
| + {ui::VKEY_7, ui::DomCode::DIGIT7, ui::EF_COMMAND_DOWN,
|
| + ui::DomKey::Constant<'7'>::Character},
|
| + {ui::VKEY_F7, ui::DomCode::F7, ui::EF_NONE, ui::DomKey::F7}},
|
| + {ui::ET_KEY_PRESSED,
|
| + {ui::VKEY_8, ui::DomCode::DIGIT8, ui::EF_COMMAND_DOWN,
|
| + ui::DomKey::Constant<'8'>::Character},
|
| + {ui::VKEY_F8, ui::DomCode::F8, ui::EF_NONE, ui::DomKey::F8}},
|
| + {ui::ET_KEY_PRESSED,
|
| + {ui::VKEY_9, ui::DomCode::DIGIT9, ui::EF_COMMAND_DOWN,
|
| + ui::DomKey::Constant<'9'>::Character},
|
| + {ui::VKEY_F9, ui::DomCode::F9, ui::EF_NONE, ui::DomKey::F9}},
|
| + {ui::ET_KEY_PRESSED,
|
| + {ui::VKEY_0, ui::DomCode::DIGIT0, ui::EF_COMMAND_DOWN,
|
| + ui::DomKey::Constant<'0'>::Character},
|
| + {ui::VKEY_F10, ui::DomCode::F10, ui::EF_NONE, ui::DomKey::F10}},
|
| + {ui::ET_KEY_PRESSED,
|
| + {ui::VKEY_OEM_MINUS, ui::DomCode::MINUS, ui::EF_COMMAND_DOWN,
|
| + ui::DomKey::Constant<'-'>::Character},
|
| + {ui::VKEY_F11, ui::DomCode::F11, ui::EF_NONE, ui::DomKey::F11}},
|
| + {ui::ET_KEY_PRESSED,
|
| + {ui::VKEY_OEM_PLUS, ui::DomCode::EQUAL, ui::EF_COMMAND_DOWN,
|
| + ui::DomKey::Constant<'='>::Character},
|
| + {ui::VKEY_F12, ui::DomCode::F12, ui::EF_NONE, ui::DomKey::F12}},
|
|
|
| // The function keys should not be rewritten with Search key pressed.
|
| {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_F1, ui::DomCode::F1, ui::EF_COMMAND_DOWN, ui::DomKey::F1, 0},
|
| - {ui::VKEY_F1, ui::DomCode::F1, ui::EF_NONE, ui::DomKey::F1, 0}},
|
| + {ui::VKEY_F1, ui::DomCode::F1, ui::EF_COMMAND_DOWN, ui::DomKey::F1},
|
| + {ui::VKEY_F1, ui::DomCode::F1, ui::EF_NONE, ui::DomKey::F1}},
|
| {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_F2, ui::DomCode::F2, ui::EF_COMMAND_DOWN, ui::DomKey::F2, 0},
|
| - {ui::VKEY_F2, ui::DomCode::F2, ui::EF_NONE, ui::DomKey::F2, 0}},
|
| + {ui::VKEY_F2, ui::DomCode::F2, ui::EF_COMMAND_DOWN, ui::DomKey::F2},
|
| + {ui::VKEY_F2, ui::DomCode::F2, ui::EF_NONE, ui::DomKey::F2}},
|
| {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_F3, ui::DomCode::F3, ui::EF_COMMAND_DOWN, ui::DomKey::F3, 0},
|
| - {ui::VKEY_F3, ui::DomCode::F3, ui::EF_NONE, ui::DomKey::F3, 0}},
|
| + {ui::VKEY_F3, ui::DomCode::F3, ui::EF_COMMAND_DOWN, ui::DomKey::F3},
|
| + {ui::VKEY_F3, ui::DomCode::F3, ui::EF_NONE, ui::DomKey::F3}},
|
| {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_F4, ui::DomCode::F4, ui::EF_COMMAND_DOWN, ui::DomKey::F4, 0},
|
| - {ui::VKEY_F4, ui::DomCode::F4, ui::EF_NONE, ui::DomKey::F4, 0}},
|
| + {ui::VKEY_F4, ui::DomCode::F4, ui::EF_COMMAND_DOWN, ui::DomKey::F4},
|
| + {ui::VKEY_F4, ui::DomCode::F4, ui::EF_NONE, ui::DomKey::F4}},
|
| {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_F5, ui::DomCode::F5, ui::EF_COMMAND_DOWN, ui::DomKey::F5, 0},
|
| - {ui::VKEY_F5, ui::DomCode::F5, ui::EF_NONE, ui::DomKey::F5, 0}},
|
| + {ui::VKEY_F5, ui::DomCode::F5, ui::EF_COMMAND_DOWN, ui::DomKey::F5},
|
| + {ui::VKEY_F5, ui::DomCode::F5, ui::EF_NONE, ui::DomKey::F5}},
|
| {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_F6, ui::DomCode::F6, ui::EF_COMMAND_DOWN, ui::DomKey::F6, 0},
|
| - {ui::VKEY_F6, ui::DomCode::F6, ui::EF_NONE, ui::DomKey::F6, 0}},
|
| + {ui::VKEY_F6, ui::DomCode::F6, ui::EF_COMMAND_DOWN, ui::DomKey::F6},
|
| + {ui::VKEY_F6, ui::DomCode::F6, ui::EF_NONE, ui::DomKey::F6}},
|
| {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_F7, ui::DomCode::F7, ui::EF_COMMAND_DOWN, ui::DomKey::F7, 0},
|
| - {ui::VKEY_F7, ui::DomCode::F7, ui::EF_NONE, ui::DomKey::F7, 0}},
|
| + {ui::VKEY_F7, ui::DomCode::F7, ui::EF_COMMAND_DOWN, ui::DomKey::F7},
|
| + {ui::VKEY_F7, ui::DomCode::F7, ui::EF_NONE, ui::DomKey::F7}},
|
| {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_F8, ui::DomCode::F8, ui::EF_COMMAND_DOWN, ui::DomKey::F8, 0},
|
| - {ui::VKEY_F8, ui::DomCode::F8, ui::EF_NONE, ui::DomKey::F8, 0}},
|
| + {ui::VKEY_F8, ui::DomCode::F8, ui::EF_COMMAND_DOWN, ui::DomKey::F8},
|
| + {ui::VKEY_F8, ui::DomCode::F8, ui::EF_NONE, ui::DomKey::F8}},
|
| {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_F9, ui::DomCode::F9, ui::EF_COMMAND_DOWN, ui::DomKey::F9, 0},
|
| - {ui::VKEY_F9, ui::DomCode::F9, ui::EF_NONE, ui::DomKey::F9, 0}},
|
| + {ui::VKEY_F9, ui::DomCode::F9, ui::EF_COMMAND_DOWN, ui::DomKey::F9},
|
| + {ui::VKEY_F9, ui::DomCode::F9, ui::EF_NONE, ui::DomKey::F9}},
|
| {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_F10,
|
| - ui::DomCode::F10,
|
| - ui::EF_COMMAND_DOWN,
|
| - ui::DomKey::F10,
|
| - 0},
|
| - {ui::VKEY_F10, ui::DomCode::F10, ui::EF_NONE, ui::DomKey::F10, 0}},
|
| + {ui::VKEY_F10, ui::DomCode::F10, ui::EF_COMMAND_DOWN, ui::DomKey::F10},
|
| + {ui::VKEY_F10, ui::DomCode::F10, ui::EF_NONE, ui::DomKey::F10}},
|
| {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_F11,
|
| - ui::DomCode::F11,
|
| - ui::EF_COMMAND_DOWN,
|
| - ui::DomKey::F11,
|
| - 0},
|
| - {ui::VKEY_F11, ui::DomCode::F11, ui::EF_NONE, ui::DomKey::F11, 0}},
|
| + {ui::VKEY_F11, ui::DomCode::F11, ui::EF_COMMAND_DOWN, ui::DomKey::F11},
|
| + {ui::VKEY_F11, ui::DomCode::F11, ui::EF_NONE, ui::DomKey::F11}},
|
| {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_F12,
|
| - ui::DomCode::F12,
|
| - ui::EF_COMMAND_DOWN,
|
| - ui::DomKey::F12,
|
| - 0},
|
| - {ui::VKEY_F12, ui::DomCode::F12, ui::EF_NONE, ui::DomKey::F12, 0}}};
|
| + {ui::VKEY_F12, ui::DomCode::F12, ui::EF_COMMAND_DOWN, ui::DomKey::F12},
|
| + {ui::VKEY_F12, ui::DomCode::F12, ui::EF_NONE, ui::DomKey::F12}}};
|
|
|
| for (const auto& test : tests) {
|
| CheckKeyTestCase(&rewriter, test);
|
| @@ -2581,21 +1793,16 @@ TEST_F(EventRewriterTest, TestRewriteExtendedKeysWithSearchRemapped) {
|
| KeyTestCase tests[] = {
|
| // Alt+Search+Down -> End
|
| {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_DOWN,
|
| - ui::DomCode::ARROW_DOWN,
|
| - ui::EF_ALT_DOWN | ui::EF_COMMAND_DOWN,
|
| - ui::DomKey::ARROW_DOWN,
|
| - 0},
|
| - {ui::VKEY_END, ui::DomCode::END, ui::EF_NONE, ui::DomKey::END, 0}},
|
| + {ui::VKEY_DOWN, ui::DomCode::ARROW_DOWN,
|
| + ui::EF_ALT_DOWN | ui::EF_COMMAND_DOWN, ui::DomKey::ARROW_DOWN},
|
| + {ui::VKEY_END, ui::DomCode::END, ui::EF_NONE, ui::DomKey::END}},
|
|
|
| // Shift+Alt+Search+Down -> Shift+End
|
| {ui::ET_KEY_PRESSED,
|
| - {ui::VKEY_DOWN,
|
| - ui::DomCode::ARROW_DOWN,
|
| + {ui::VKEY_DOWN, ui::DomCode::ARROW_DOWN,
|
| ui::EF_SHIFT_DOWN | ui::EF_ALT_DOWN | ui::EF_COMMAND_DOWN,
|
| - ui::DomKey::ARROW_DOWN,
|
| - 0},
|
| - {ui::VKEY_END, ui::DomCode::END, ui::EF_SHIFT_DOWN, ui::DomKey::END, 0}},
|
| + ui::DomKey::ARROW_DOWN},
|
| + {ui::VKEY_END, ui::DomCode::END, ui::EF_SHIFT_DOWN, ui::DomKey::END}},
|
| };
|
|
|
| for (const auto& test : tests) {
|
| @@ -2619,7 +1826,7 @@ TEST_F(EventRewriterTest, TestRewriteKeyEventSentByXSendEvent) {
|
| {
|
| ui::KeyEvent keyevent(ui::ET_KEY_PRESSED, ui::VKEY_CONTROL,
|
| ui::DomCode::CONTROL_LEFT, ui::EF_FINAL,
|
| - ui::DomKey::CONTROL, 0, ui::EventTimeForNow());
|
| + ui::DomKey::CONTROL, ui::EventTimeForNow());
|
| scoped_ptr<ui::Event> new_event;
|
| // Control should NOT be remapped to Alt if EF_FINAL is set.
|
| EXPECT_EQ(ui::EVENT_REWRITE_CONTINUE,
|
| @@ -2740,9 +1947,8 @@ class EventRewriterAshTest : public ash::test::AshTestBase {
|
| void SendKeyEvent(ui::EventType type,
|
| ui::KeyboardCode key_code,
|
| ui::DomCode code,
|
| - ui::DomKey key,
|
| - base::char16 character) {
|
| - ui::KeyEvent press(type, key_code, code, ui::EF_NONE, key, character,
|
| + ui::DomKey key) {
|
| + ui::KeyEvent press(type, key_code, code, ui::EF_NONE, key,
|
| ui::EventTimeForNow());
|
| ui::EventDispatchDetails details = Send(&press);
|
| CHECK(!details.dispatcher_destroyed);
|
| @@ -2750,10 +1956,9 @@ class EventRewriterAshTest : public ash::test::AshTestBase {
|
|
|
| void SendActivateStickyKeyPattern(ui::KeyboardCode key_code,
|
| ui::DomCode code,
|
| - ui::DomKey key,
|
| - base::char16 character) {
|
| - SendKeyEvent(ui::ET_KEY_PRESSED, key_code, code, key, character);
|
| - SendKeyEvent(ui::ET_KEY_RELEASED, key_code, code, key, character);
|
| + ui::DomKey key) {
|
| + SendKeyEvent(ui::ET_KEY_PRESSED, key_code, code, key);
|
| + SendKeyEvent(ui::ET_KEY_RELEASED, key_code, code, key);
|
| }
|
|
|
| protected:
|
| @@ -2804,7 +2009,7 @@ TEST_F(EventRewriterAshTest, TopRowKeysAreFunctionKeys) {
|
|
|
| // Create a simulated keypress of F1 targetted at the window.
|
| ui::KeyEvent press_f1(ui::ET_KEY_PRESSED, ui::VKEY_F1, ui::DomCode::F1,
|
| - ui::EF_NONE, ui::DomKey::F1, 0, ui::EventTimeForNow());
|
| + ui::EF_NONE, ui::DomKey::F1, ui::EventTimeForNow());
|
|
|
| // Simulate an apps v2 window that has requested top row keys as function
|
| // keys. The event should not be rewritten.
|
| @@ -2813,10 +2018,10 @@ TEST_F(EventRewriterAshTest, TopRowKeysAreFunctionKeys) {
|
| ASSERT_FALSE(details.dispatcher_destroyed);
|
| PopEvents(&events);
|
| EXPECT_EQ(1u, events.size());
|
| - EXPECT_EQ(GetExpectedResultAsString(ui::ET_KEY_PRESSED, ui::VKEY_F1,
|
| - ui::DomCode::F1, ui::EF_NONE,
|
| - ui::DomKey::F1, 0),
|
| - GetKeyEventAsString(*static_cast<ui::KeyEvent*>(events[0])));
|
| + EXPECT_EQ(
|
| + GetExpectedResultAsString(ui::ET_KEY_PRESSED, ui::VKEY_F1,
|
| + ui::DomCode::F1, ui::EF_NONE, ui::DomKey::F1),
|
| + GetKeyEventAsString(*static_cast<ui::KeyEvent*>(events[0])));
|
|
|
| // The event should also not be rewritten if the send-function-keys pref is
|
| // additionally set, for both apps v2 and regular windows.
|
| @@ -2828,10 +2033,10 @@ TEST_F(EventRewriterAshTest, TopRowKeysAreFunctionKeys) {
|
| ASSERT_FALSE(details.dispatcher_destroyed);
|
| PopEvents(&events);
|
| EXPECT_EQ(1u, events.size());
|
| - EXPECT_EQ(GetExpectedResultAsString(ui::ET_KEY_PRESSED, ui::VKEY_F1,
|
| - ui::DomCode::F1, ui::EF_NONE,
|
| - ui::DomKey::F1, 0),
|
| - GetKeyEventAsString(*static_cast<ui::KeyEvent*>(events[0])));
|
| + EXPECT_EQ(
|
| + GetExpectedResultAsString(ui::ET_KEY_PRESSED, ui::VKEY_F1,
|
| + ui::DomCode::F1, ui::EF_NONE, ui::DomKey::F1),
|
| + GetKeyEventAsString(*static_cast<ui::KeyEvent*>(events[0])));
|
|
|
| // If the pref isn't set when an event is sent to a regular window, F1 is
|
| // rewritten to the back key.
|
| @@ -2842,7 +2047,7 @@ TEST_F(EventRewriterAshTest, TopRowKeysAreFunctionKeys) {
|
| EXPECT_EQ(1u, events.size());
|
| EXPECT_EQ(GetExpectedResultAsString(ui::ET_KEY_PRESSED, ui::VKEY_BROWSER_BACK,
|
| ui::DomCode::BROWSER_BACK, ui::EF_NONE,
|
| - ui::DomKey::BROWSER_BACK, 0),
|
| + ui::DomKey::BROWSER_BACK),
|
| GetKeyEventAsString(*static_cast<ui::KeyEvent*>(events[0])));
|
| }
|
|
|
| @@ -3093,7 +2298,7 @@ TEST_F(EventRewriterAshTest, StickyKeyEventDispatchImpl) {
|
| ScopedVector<ui::Event> events;
|
|
|
| SendActivateStickyKeyPattern(ui::VKEY_CONTROL, ui::DomCode::CONTROL_LEFT,
|
| - ui::DomKey::CONTROL, 0);
|
| + ui::DomKey::CONTROL);
|
| PopEvents(&events);
|
| EXPECT_EQ(1u, events.size());
|
| EXPECT_EQ(ui::ET_KEY_PRESSED, events[0]->type());
|
| @@ -3103,7 +2308,7 @@ TEST_F(EventRewriterAshTest, StickyKeyEventDispatchImpl) {
|
| // Test key press event is correctly modified and modifier release
|
| // event is sent.
|
| ui::KeyEvent press(ui::ET_KEY_PRESSED, ui::VKEY_C, ui::DomCode::KEY_C,
|
| - ui::EF_NONE, ui::DomKey::CHARACTER, 'c',
|
| + ui::EF_NONE, ui::DomKey::Constant<'c'>::Character,
|
| ui::EventTimeForNow());
|
| ui::EventDispatchDetails details = Send(&press);
|
| PopEvents(&events);
|
| @@ -3117,7 +2322,7 @@ TEST_F(EventRewriterAshTest, StickyKeyEventDispatchImpl) {
|
|
|
| // Test key release event is not modified.
|
| ui::KeyEvent release(ui::ET_KEY_RELEASED, ui::VKEY_C, ui::DomCode::KEY_C,
|
| - ui::EF_NONE, ui::DomKey::CHARACTER, 'c',
|
| + ui::EF_NONE, ui::DomKey::Constant<'c'>::Character,
|
| ui::EventTimeForNow());
|
| details = Send(&release);
|
| ASSERT_FALSE(details.dispatcher_destroyed);
|
| @@ -3132,7 +2337,7 @@ TEST_F(EventRewriterAshTest, MouseEventDispatchImpl) {
|
| ScopedVector<ui::Event> events;
|
|
|
| SendActivateStickyKeyPattern(ui::VKEY_CONTROL, ui::DomCode::CONTROL_LEFT,
|
| - ui::DomKey::CONTROL, 0);
|
| + ui::DomKey::CONTROL);
|
| PopEvents(&events);
|
|
|
| // Test mouse press event is correctly modified.
|
| @@ -3169,7 +2374,7 @@ TEST_F(EventRewriterAshTest, MouseWheelEventDispatchImpl) {
|
| // Test positive mouse wheel event is correctly modified and modifier release
|
| // event is sent.
|
| SendActivateStickyKeyPattern(ui::VKEY_CONTROL, ui::DomCode::CONTROL_LEFT,
|
| - ui::DomKey::CONTROL, 0);
|
| + ui::DomKey::CONTROL);
|
| PopEvents(&events);
|
| gfx::Point location(0, 0);
|
| ui::MouseEvent mev(ui::ET_MOUSEWHEEL, location, location,
|
| @@ -3189,7 +2394,7 @@ TEST_F(EventRewriterAshTest, MouseWheelEventDispatchImpl) {
|
| // Test negative mouse wheel event is correctly modified and modifier release
|
| // event is sent.
|
| SendActivateStickyKeyPattern(ui::VKEY_CONTROL, ui::DomCode::CONTROL_LEFT,
|
| - ui::DomKey::CONTROL, 0);
|
| + ui::DomKey::CONTROL);
|
| PopEvents(&events);
|
| ui::MouseWheelEvent negative(mev, 0, -ui::MouseWheelEvent::kWheelDelta);
|
| details = Send(&negative);
|
| @@ -3225,14 +2430,14 @@ TEST_F(StickyKeysOverlayTest, OneModifierEnabled) {
|
|
|
| // Pressing modifier key should show overlay.
|
| SendActivateStickyKeyPattern(ui::VKEY_CONTROL, ui::DomCode::CONTROL_LEFT,
|
| - ui::DomKey::CONTROL, 0);
|
| + ui::DomKey::CONTROL);
|
| EXPECT_TRUE(overlay_->is_visible());
|
| EXPECT_EQ(ash::STICKY_KEY_STATE_ENABLED,
|
| overlay_->GetModifierKeyState(ui::EF_CONTROL_DOWN));
|
|
|
| // Pressing a normal key should hide overlay.
|
| SendActivateStickyKeyPattern(ui::VKEY_T, ui::DomCode::KEY_T,
|
| - ui::DomKey::CHARACTER, 't');
|
| + ui::DomKey::Constant<'t'>::Character);
|
| EXPECT_FALSE(overlay_->is_visible());
|
| EXPECT_EQ(ash::STICKY_KEY_STATE_DISABLED,
|
| overlay_->GetModifierKeyState(ui::EF_CONTROL_DOWN));
|
| @@ -3247,9 +2452,9 @@ TEST_F(StickyKeysOverlayTest, TwoModifiersEnabled) {
|
|
|
| // Pressing two modifiers should show overlay.
|
| SendActivateStickyKeyPattern(ui::VKEY_SHIFT, ui::DomCode::SHIFT_LEFT,
|
| - ui::DomKey::SHIFT, 0);
|
| + ui::DomKey::SHIFT);
|
| SendActivateStickyKeyPattern(ui::VKEY_CONTROL, ui::DomCode::CONTROL_LEFT,
|
| - ui::DomKey::CONTROL, 0);
|
| + ui::DomKey::CONTROL);
|
| EXPECT_TRUE(overlay_->is_visible());
|
| EXPECT_EQ(ash::STICKY_KEY_STATE_ENABLED,
|
| overlay_->GetModifierKeyState(ui::EF_SHIFT_DOWN));
|
| @@ -3258,7 +2463,7 @@ TEST_F(StickyKeysOverlayTest, TwoModifiersEnabled) {
|
|
|
| // Pressing a normal key should hide overlay.
|
| SendActivateStickyKeyPattern(ui::VKEY_N, ui::DomCode::KEY_N,
|
| - ui::DomKey::CHARACTER, 'n');
|
| + ui::DomKey::Constant<'n'>::Character);
|
| EXPECT_FALSE(overlay_->is_visible());
|
| EXPECT_EQ(ash::STICKY_KEY_STATE_DISABLED,
|
| overlay_->GetModifierKeyState(ui::EF_CONTROL_DOWN));
|
| @@ -3273,16 +2478,16 @@ TEST_F(StickyKeysOverlayTest, LockedModifier) {
|
|
|
| // Pressing a modifier key twice should lock modifier and show overlay.
|
| SendActivateStickyKeyPattern(ui::VKEY_LMENU, ui::DomCode::ALT_LEFT,
|
| - ui::DomKey::ALT, 0);
|
| + ui::DomKey::ALT);
|
| SendActivateStickyKeyPattern(ui::VKEY_LMENU, ui::DomCode::ALT_LEFT,
|
| - ui::DomKey::ALT, 0);
|
| + ui::DomKey::ALT);
|
| EXPECT_TRUE(overlay_->is_visible());
|
| EXPECT_EQ(ash::STICKY_KEY_STATE_LOCKED,
|
| overlay_->GetModifierKeyState(ui::EF_ALT_DOWN));
|
|
|
| // Pressing a normal key should not hide overlay.
|
| SendActivateStickyKeyPattern(ui::VKEY_D, ui::DomCode::KEY_D,
|
| - ui::DomKey::CHARACTER, 'd');
|
| + ui::DomKey::Constant<'d'>::Character);
|
| EXPECT_TRUE(overlay_->is_visible());
|
| EXPECT_EQ(ash::STICKY_KEY_STATE_LOCKED,
|
| overlay_->GetModifierKeyState(ui::EF_ALT_DOWN));
|
| @@ -3297,16 +2502,16 @@ TEST_F(StickyKeysOverlayTest, LockedAndNormalModifier) {
|
|
|
| // Pressing a modifier key twice should lock modifier and show overlay.
|
| SendActivateStickyKeyPattern(ui::VKEY_CONTROL, ui::DomCode::CONTROL_LEFT,
|
| - ui::DomKey::CONTROL, 0);
|
| + ui::DomKey::CONTROL);
|
| SendActivateStickyKeyPattern(ui::VKEY_CONTROL, ui::DomCode::CONTROL_LEFT,
|
| - ui::DomKey::CONTROL, 0);
|
| + ui::DomKey::CONTROL);
|
| EXPECT_TRUE(overlay_->is_visible());
|
| EXPECT_EQ(ash::STICKY_KEY_STATE_LOCKED,
|
| overlay_->GetModifierKeyState(ui::EF_CONTROL_DOWN));
|
|
|
| // Pressing another modifier key should still show overlay.
|
| SendActivateStickyKeyPattern(ui::VKEY_SHIFT, ui::DomCode::SHIFT_LEFT,
|
| - ui::DomKey::SHIFT, 0);
|
| + ui::DomKey::SHIFT);
|
| EXPECT_TRUE(overlay_->is_visible());
|
| EXPECT_EQ(ash::STICKY_KEY_STATE_LOCKED,
|
| overlay_->GetModifierKeyState(ui::EF_CONTROL_DOWN));
|
| @@ -3315,7 +2520,7 @@ TEST_F(StickyKeysOverlayTest, LockedAndNormalModifier) {
|
|
|
| // Pressing a normal key should not hide overlay but disable normal modifier.
|
| SendActivateStickyKeyPattern(ui::VKEY_D, ui::DomCode::KEY_D,
|
| - ui::DomKey::CHARACTER, 'd');
|
| + ui::DomKey::Constant<'d'>::Character);
|
| EXPECT_TRUE(overlay_->is_visible());
|
| EXPECT_EQ(ash::STICKY_KEY_STATE_LOCKED,
|
| overlay_->GetModifierKeyState(ui::EF_CONTROL_DOWN));
|
| @@ -3336,17 +2541,17 @@ TEST_F(StickyKeysOverlayTest, ModifiersDisabled) {
|
|
|
| // Enable modifiers.
|
| SendActivateStickyKeyPattern(ui::VKEY_CONTROL, ui::DomCode::CONTROL_LEFT,
|
| - ui::DomKey::CONTROL, 0);
|
| + ui::DomKey::CONTROL);
|
| SendActivateStickyKeyPattern(ui::VKEY_SHIFT, ui::DomCode::SHIFT_LEFT,
|
| - ui::DomKey::SHIFT, 0);
|
| + ui::DomKey::SHIFT);
|
| SendActivateStickyKeyPattern(ui::VKEY_SHIFT, ui::DomCode::SHIFT_LEFT,
|
| - ui::DomKey::SHIFT, 0);
|
| + ui::DomKey::SHIFT);
|
| SendActivateStickyKeyPattern(ui::VKEY_LMENU, ui::DomCode::ALT_LEFT,
|
| - ui::DomKey::ALT, 0);
|
| + ui::DomKey::ALT);
|
| SendActivateStickyKeyPattern(ui::VKEY_COMMAND, ui::DomCode::OS_LEFT,
|
| - ui::DomKey::OS, 0);
|
| + ui::DomKey::OS);
|
| SendActivateStickyKeyPattern(ui::VKEY_COMMAND, ui::DomCode::OS_LEFT,
|
| - ui::DomKey::OS, 0);
|
| + ui::DomKey::OS);
|
|
|
| EXPECT_TRUE(overlay_->is_visible());
|
| EXPECT_EQ(ash::STICKY_KEY_STATE_ENABLED,
|
| @@ -3360,17 +2565,17 @@ TEST_F(StickyKeysOverlayTest, ModifiersDisabled) {
|
|
|
| // Disable modifiers and overlay should be hidden.
|
| SendActivateStickyKeyPattern(ui::VKEY_CONTROL, ui::DomCode::CONTROL_LEFT,
|
| - ui::DomKey::CONTROL, 0);
|
| + ui::DomKey::CONTROL);
|
| SendActivateStickyKeyPattern(ui::VKEY_CONTROL, ui::DomCode::CONTROL_LEFT,
|
| - ui::DomKey::CONTROL, 0);
|
| + ui::DomKey::CONTROL);
|
| SendActivateStickyKeyPattern(ui::VKEY_SHIFT, ui::DomCode::SHIFT_LEFT,
|
| - ui::DomKey::SHIFT, 0);
|
| + ui::DomKey::SHIFT);
|
| SendActivateStickyKeyPattern(ui::VKEY_LMENU, ui::DomCode::ALT_LEFT,
|
| - ui::DomKey::ALT, 0);
|
| + ui::DomKey::ALT);
|
| SendActivateStickyKeyPattern(ui::VKEY_LMENU, ui::DomCode::ALT_LEFT,
|
| - ui::DomKey::ALT, 0);
|
| + ui::DomKey::ALT);
|
| SendActivateStickyKeyPattern(ui::VKEY_COMMAND, ui::DomCode::OS_LEFT,
|
| - ui::DomKey::OS, 0);
|
| + ui::DomKey::OS);
|
|
|
| EXPECT_FALSE(overlay_->is_visible());
|
| EXPECT_EQ(ash::STICKY_KEY_STATE_DISABLED,
|
|
|