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

Unified Diff: ui/events/event.cc

Issue 1585193002: Build key map DomCodeToKey() for Windows (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix unittest Created 4 years, 10 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/event.cc
diff --git a/ui/events/event.cc b/ui/events/event.cc
index 5d6d0f2ecdf739f01b1df5ba02217c39b8096673..6e1228c82d83b171518e0e71b81ce9af67ec3a91 100644
--- a/ui/events/event.cc
+++ b/ui/events/event.cc
@@ -37,6 +37,10 @@
#include "ui/events/ozone/layout/keyboard_layout_engine_manager.h" // nogncheck
#endif
+#if defined(OS_WIN)
+#include "ui/events/keycodes/platform_key_map_win.h"
+#endif
+
namespace {
std::string EventTypeName(ui::EventType type) {
@@ -760,6 +764,8 @@ KeyEvent::KeyEvent(const base::NativeEvent& native_event)
// Only Windows has native character events.
if (is_char_)
key_ = DomKey::FromCharacter(native_event.wParam);
+ else
+ key_ = PlatformKeyMap::DomCodeAndFlagsToDomKeyStatic(code_, flags());
#endif
}

Powered by Google App Engine
This is Rietveld 408576698