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

Unified Diff: ui/events/ozone/evdev/keyboard_evdev.cc

Issue 668943003: ozone: evdev: Drop unmapped key events (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/ozone/evdev/keyboard_evdev.cc
diff --git a/ui/events/ozone/evdev/keyboard_evdev.cc b/ui/events/ozone/evdev/keyboard_evdev.cc
index 468f0fdf280bf184551b1835c68bffd34842dd54..b5a0849e0736a70e872db45f86e7ae0aa33039d7 100644
--- a/ui/events/ozone/evdev/keyboard_evdev.cc
+++ b/ui/events/ozone/evdev/keyboard_evdev.cc
@@ -228,6 +228,9 @@ void KeyboardEvdev::DispatchKey(unsigned int key, bool down) {
ui::KeyboardCode code = KeyboardCodeFromEvdevKey(key);
int flags = modifiers_->GetModifierFlags();
+ if (code == VKEY_UNKNOWN)
+ return;
+
callback_.Run(make_scoped_ptr(new KeyEvent(
down ? ET_KEY_PRESSED : ET_KEY_RELEASED,
code,
« no previous file with comments | « ui/events/ozone/evdev/key_event_converter_evdev_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698