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

Side by Side Diff: ui/events/event.cc

Issue 1776673007: [Windows] Produce correct DomKey for NumPad when combined with Shift/NumLock (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: wez's review 2 Created 4 years, 9 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
« no previous file with comments | « ui/events/BUILD.gn ('k') | ui/events/events.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/event.h" 5 #include "ui/events/event.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #if defined(USE_X11) 9 #if defined(USE_X11)
10 #include <X11/extensions/XInput2.h> 10 #include <X11/extensions/XInput2.h>
(...skipping 847 matching lines...) Expand 10 before | Expand all | Expand 10 after
858 set_flags(flags() | ui::EF_IS_REPEAT); 858 set_flags(flags() | ui::EF_IS_REPEAT);
859 859
860 #if defined(USE_X11) 860 #if defined(USE_X11)
861 NormalizeFlags(); 861 NormalizeFlags();
862 #endif 862 #endif
863 #if defined(OS_WIN) 863 #if defined(OS_WIN)
864 // Only Windows has native character events. 864 // Only Windows has native character events.
865 if (is_char_) 865 if (is_char_)
866 key_ = DomKey::FromCharacter(native_event.wParam); 866 key_ = DomKey::FromCharacter(native_event.wParam);
867 else 867 else
868 key_ = PlatformKeyMap::DomCodeAndFlagsToDomKeyStatic(code_, flags()); 868 key_ = PlatformKeyMap::DomKeyFromNative(native_event);
869 #endif 869 #endif
870 } 870 }
871 871
872 KeyEvent::KeyEvent(EventType type, 872 KeyEvent::KeyEvent(EventType type,
873 KeyboardCode key_code, 873 KeyboardCode key_code,
874 int flags) 874 int flags)
875 : Event(type, EventTimeForNow(), flags), 875 : Event(type, EventTimeForNow(), flags),
876 key_code_(key_code), 876 key_code_(key_code),
877 code_(UsLayoutKeyboardCodeToDomCode(key_code)) { 877 code_(UsLayoutKeyboardCodeToDomCode(key_code)) {
878 } 878 }
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
1147 gfx::PointF(x, y), 1147 gfx::PointF(x, y),
1148 time_stamp, 1148 time_stamp,
1149 flags | EF_FROM_TOUCH), 1149 flags | EF_FROM_TOUCH),
1150 details_(details) { 1150 details_(details) {
1151 } 1151 }
1152 1152
1153 GestureEvent::~GestureEvent() { 1153 GestureEvent::~GestureEvent() {
1154 } 1154 }
1155 1155
1156 } // namespace ui 1156 } // namespace ui
OLDNEW
« no previous file with comments | « ui/events/BUILD.gn ('k') | ui/events/events.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698