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

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

Issue 806693009: Port ScopedDisableInternalMouseAndKeyboardX11 to Ozone (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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/ozone/evdev/keyboard_evdev.cc
diff --git a/ui/events/ozone/evdev/keyboard_evdev.cc b/ui/events/ozone/evdev/keyboard_evdev.cc
index de7d84ac997e63ea275da4d3f9aa56ce278502f8..d4ffe4b5c8e3711bb08dd13fdcb1ecde5ccecf9e 100644
--- a/ui/events/ozone/evdev/keyboard_evdev.cc
+++ b/ui/events/ozone/evdev/keyboard_evdev.cc
@@ -189,4 +189,11 @@ int KeyboardEvdev::NativeCodeToEvdevCode(int native_code) {
return native_code - kXkbKeycodeOffset;
}
+// static
+int KeyboardEvdev::EvdevCodeToNativeCode(int evdev_code) {
+ if (evdev_code == KEY_RESERVED)
+ return KeycodeConverter::InvalidNativeKeycode();
+ return evdev_code + kXkbKeycodeOffset;
+}
+
} // namespace ui

Powered by Google App Engine
This is Rietveld 408576698