diff options
-rw-r--r-- | ui/events/keycodes/keyboard_code_conversion_x.cc | 4 | ||||
-rw-r--r-- | ui/events/keycodes/keyboard_codes_posix.h | 5 |
2 files changed, 9 insertions, 0 deletions
diff --git a/ui/events/keycodes/keyboard_code_conversion_x.cc b/ui/events/keycodes/keyboard_code_conversion_x.cc index 60714f2..821f8c4 100644 --- a/ui/events/keycodes/keyboard_code_conversion_x.cc +++ b/ui/events/keycodes/keyboard_code_conversion_x.cc @@ -285,6 +285,8 @@ KeyboardCode KeyboardCodeFromXKeysym(unsigned int keysym) { return VKEY_MENU; case XK_ISO_Level3_Shift: return VKEY_ALTGR; + case XK_Multi_key: + return VKEY_COMPOSE; case XK_Pause: return VKEY_PAUSE; case XK_Caps_Lock: @@ -592,6 +594,8 @@ int XKeysymForWindowsKeyCode(KeyboardCode keycode, bool shift) { return XK_Menu; case VKEY_ALTGR: return XK_ISO_Level3_Shift; + case VKEY_COMPOSE: + return XK_Multi_key; case VKEY_PAUSE: return XK_Pause; diff --git a/ui/events/keycodes/keyboard_codes_posix.h b/ui/events/keycodes/keyboard_codes_posix.h index 1f7e06f..e984839 100644 --- a/ui/events/keycodes/keyboard_codes_posix.h +++ b/ui/events/keycodes/keyboard_codes_posix.h @@ -221,6 +221,11 @@ enum KeyboardCode { // (VK_OEM_AX) code to represent AltGr, matching the behaviour of Firefox on // Linux. VKEY_ALTGR = 0xE1, +#if defined(USE_X11) + // Windows does not have a specific key code for Compose. We use the unused + // 0xE6 (VK_ICO_CLEAR) code to represent Compose. + VKEY_COMPOSE = 0xE6, +#endif }; } // namespace ui |