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

Unified Diff: ui/views/controls/textfield/textfield.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
« no previous file with comments | « ui/events/base_event_utils.cc ('k') | ui/views/controls/textfield/textfield_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/textfield/textfield.cc
diff --git a/ui/views/controls/textfield/textfield.cc b/ui/views/controls/textfield/textfield.cc
index d3b684c449f1c989f45422f70df5cbfbeb23bc7b..c20ea8179350312aefb84f575098d8f251f65fd5 100644
--- a/ui/views/controls/textfield/textfield.cc
+++ b/ui/views/controls/textfield/textfield.cc
@@ -1453,10 +1453,10 @@ void Textfield::InsertChar(base::char16 ch, int flags) {
// Filter out all control characters, including tab and new line characters,
// and all characters with Alt modifier (and Search on ChromeOS). But allow
// characters with the AltGr modifier. On Windows AltGr is represented by
- // Alt+Ctrl, and on Linux it's a different flag that we don't care about.
- const bool should_insert_char =
- ((ch >= 0x20 && ch < 0x7F) || ch > 0x9F) &&
- !ui::IsSystemKeyModifier(flags);
+ // Alt+Ctrl or Right Alt, and on Linux it's a different flag that we don't
+ // care about.
+ const bool should_insert_char = ((ch >= 0x20 && ch < 0x7F) || ch > 0x9F) &&
+ !ui::IsSystemKeyModifier(flags);
if (GetTextInputType() == ui::TEXT_INPUT_TYPE_NONE || !should_insert_char)
return;
« no previous file with comments | « ui/events/base_event_utils.cc ('k') | ui/views/controls/textfield/textfield_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698