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

Unified Diff: ui/events/base_event_utils.cc

Issue 1355753003: Allow keys with AltGr modifier to be inserted in Textfield (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: added test Created 5 years, 3 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
Index: ui/events/base_event_utils.cc
diff --git a/ui/events/base_event_utils.cc b/ui/events/base_event_utils.cc
index 30854bc90b31134540098fa3b9f2b30448acca1f..ffff0f1da12e42f4475ba7fcd36d22c80f50b82f 100644
--- a/ui/events/base_event_utils.cc
+++ b/ui/events/base_event_utils.cc
@@ -34,7 +34,10 @@ uint32 GetNextTouchEventId() {
}
bool IsSystemKeyModifier(int flags) {
- return (kSystemKeyModifierMask & flags) != 0;
+ // AltGr modifier is used to type alternative keys on certain keyboard layouts
+ // so we don't consider keys with the AltGr modifier as a system key.
+ return (kSystemKeyModifierMask & flags) != 0 &&
+ (EF_ALTGR_DOWN & flags) == 0;
}
} // namespace ui
« no previous file with comments | « content/browser/renderer_host/native_web_keyboard_event_aura.cc ('k') | ui/views/controls/textfield/textfield.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698