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

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

Issue 376463002: Corrects the regression of [a-z] keys for non-US layouts would have wrong VKEY code if CAPSLOCK is … (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixed test failures. Created 6 years, 5 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_x.cc
diff --git a/ui/events/keycodes/keyboard_code_conversion_x.cc b/ui/events/keycodes/keyboard_code_conversion_x.cc
index 20c329771e7f75dd6345aba42c82ba077c437114..0a226fcef288331b983ee292914fcd5ab7bb0d76 100644
--- a/ui/events/keycodes/keyboard_code_conversion_x.cc
+++ b/ui/events/keycodes/keyboard_code_conversion_x.cc
@@ -476,7 +476,7 @@ KeyboardCode KeyboardCodeFromXKeyEvent(XEvent* xev) {
KeySym keysym = NoSymbol;
XKeyEvent xkey = xev->xkey;
- xkey.state &= ~(ShiftMask | Mod1Mask);
+ xkey.state &= (~0xFF | Mod2Mask); // Clears the xkey's state except numlock.
// XLookupKeysym does not take into consideration the state of the lock/shift
// etc. keys. So it is necessary to use XLookupString instead.
XLookupString(&xkey, NULL, 0, &keysym, NULL);
« 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