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

Unified Diff: ui/events/keycodes/keyboard_code_conversion_xkb.cc

Issue 1427743003: Alt remapping doesn't work when Shift is pressed on ChromeOS (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/keycodes/keyboard_code_conversion_xkb.cc
diff --git a/ui/events/keycodes/keyboard_code_conversion_xkb.cc b/ui/events/keycodes/keyboard_code_conversion_xkb.cc
index 284a59db0898dd09a591082b9e4d5765112fbb3a..aec3f75e415ae5bd9ebb0b0d389833d44e1f156c 100644
--- a/ui/events/keycodes/keyboard_code_conversion_xkb.cc
+++ b/ui/events/keycodes/keyboard_code_conversion_xkb.cc
@@ -195,12 +195,22 @@ DomKey NonPrintableXKeySymToDomKey(xkb_keysym_t keysym) {
return DomKey::CONTROL;
case XKB_KEY_Caps_Lock:
return DomKey::CAPS_LOCK;
+#if defined(OS_CHROMEOS)
+ case XKB_KEY_Meta_L:
+ case XKB_KEY_Meta_R:
+ case XKB_KEY_Alt_L:
+ case XKB_KEY_Alt_R:
+ // The Shift+Alt generates a KeySym for the Meta key. On ChromeOS the Meta
+ // key is not used and we should still get the Alt key. crbug.com/541468.
+ return DomKey::ALT;
+#else
case XKB_KEY_Meta_L:
case XKB_KEY_Meta_R:
return DomKey::META;
case XKB_KEY_Alt_L:
case XKB_KEY_Alt_R:
return DomKey::ALT;
+#endif // defined(OS_CHROMEOS)
case XKB_KEY_Super_L:
case XKB_KEY_Super_R:
return DomKey::OS;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698