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

Side by Side 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/events/base_event_utils.h" 5 #include "ui/events/base_event_utils.h"
6 6
7 #include "base/atomic_sequence_num.h" 7 #include "base/atomic_sequence_num.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "ui/events/event_constants.h" 9 #include "ui/events/event_constants.h"
10 10
(...skipping 16 matching lines...) Expand all
27 // Set the first touch event ID to 1 because we set id to 0 for other types 27 // Set the first touch event ID to 1 because we set id to 0 for other types
28 // of events. 28 // of events.
29 uint32 id = g_next_event_id.GetNext(); 29 uint32 id = g_next_event_id.GetNext();
30 if (id == 0) 30 if (id == 0)
31 id = g_next_event_id.GetNext(); 31 id = g_next_event_id.GetNext();
32 DCHECK_NE(0U, id); 32 DCHECK_NE(0U, id);
33 return id; 33 return id;
34 } 34 }
35 35
36 bool IsSystemKeyModifier(int flags) { 36 bool IsSystemKeyModifier(int flags) {
37 return (kSystemKeyModifierMask & flags) != 0; 37 // AltGr modifier is used to type alternative keys on certain keyboard layouts
38 // so we don't consider keys with the AltGr modifier as a system key.
39 return (kSystemKeyModifierMask & flags) != 0 &&
40 (EF_ALTGR_DOWN & flags) == 0;
38 } 41 }
39 42
40 } // namespace ui 43 } // namespace ui
41 44
OLDNEW
« 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