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

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: 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
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::DomCodeAndFlagsToDomKeyStatic(code_, key_code_,
dtapuska 2016/03/10 20:51:44 This is certainly odd that we require the key_code
Wez 2016/03/16 21:03:06 So sad. ;( Perhaps it would be cleanest to pass i
869 flags());
869 #endif 870 #endif
870 } 871 }
871 872
872 KeyEvent::KeyEvent(EventType type, 873 KeyEvent::KeyEvent(EventType type,
873 KeyboardCode key_code, 874 KeyboardCode key_code,
874 int flags) 875 int flags)
875 : Event(type, EventTimeForNow(), flags), 876 : Event(type, EventTimeForNow(), flags),
876 key_code_(key_code), 877 key_code_(key_code),
877 code_(UsLayoutKeyboardCodeToDomCode(key_code)) { 878 code_(UsLayoutKeyboardCodeToDomCode(key_code)) {
878 } 879 }
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
1147 gfx::PointF(x, y), 1148 gfx::PointF(x, y),
1148 time_stamp, 1149 time_stamp,
1149 flags | EF_FROM_TOUCH), 1150 flags | EF_FROM_TOUCH),
1150 details_(details) { 1151 details_(details) {
1151 } 1152 }
1152 1153
1153 GestureEvent::~GestureEvent() { 1154 GestureEvent::~GestureEvent() {
1154 } 1155 }
1155 1156
1156 } // namespace ui 1157 } // namespace ui
OLDNEW
« no previous file with comments | « no previous file | ui/events/keycodes/platform_key_map_win.h » ('j') | ui/events/keycodes/platform_key_map_win.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698