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

Unified Diff: ui/events/ozone/events_ozone.cc

Issue 404203003: Distinguish between keystroke and character events. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: IsCharFromNative() for Mac build Created 6 years, 5 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/ozone/evdev/key_event_converter_evdev.cc ('k') | ui/events/test/event_generator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/ozone/events_ozone.cc
diff --git a/ui/events/ozone/events_ozone.cc b/ui/events/ozone/events_ozone.cc
index 9ab835c1ff839ab20aca211466906acb7980d5da..6eb2bdc721de7f515748f4ad8b87d676e37ef5e6 100644
--- a/ui/events/ozone/events_ozone.cc
+++ b/ui/events/ozone/events_ozone.cc
@@ -64,6 +64,12 @@ uint32 PlatformKeycodeFromNative(const base::NativeEvent& native_event) {
return event->platform_keycode();
}
+bool IsCharFromNative(const base::NativeEvent& native_event) {
+ const ui::KeyEvent* event = static_cast<const ui::KeyEvent*>(native_event);
+ DCHECK(event->IsKeyEvent());
+ return event->is_char();
+}
+
gfx::Vector2d GetMouseWheelOffset(const base::NativeEvent& native_event) {
const ui::MouseWheelEvent* event =
static_cast<const ui::MouseWheelEvent*>(native_event);
« no previous file with comments | « ui/events/ozone/evdev/key_event_converter_evdev.cc ('k') | ui/events/test/event_generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698