| Index: remoting/host/input_injector_x11.cc
|
| diff --git a/remoting/host/input_injector_x11.cc b/remoting/host/input_injector_x11.cc
|
| index 62e13a17ecbfc42da6c674cc4904e6458494cbce..fc0c712d3f9891b5e3e93aefe56ba59c5670e3d7 100644
|
| --- a/remoting/host/input_injector_x11.cc
|
| +++ b/remoting/host/input_injector_x11.cc
|
| @@ -25,8 +25,8 @@
|
| #include "remoting/host/clipboard.h"
|
| #include "remoting/host/linux/unicode_to_keysym.h"
|
| #include "remoting/proto/internal.pb.h"
|
| -#include "remoting/protocol/usb_key_codes.h"
|
| #include "third_party/webrtc/modules/desktop_capture/desktop_geometry.h"
|
| +#include "ui/events/keycodes/dom/dom_code.h"
|
| #include "ui/events/keycodes/dom/keycode_converter.h"
|
|
|
| namespace remoting {
|
| @@ -89,15 +89,15 @@ bool FindKeycodeForUnicode(Display* display,
|
| return false;
|
| }
|
|
|
| -bool IsModifierKey(int usb_keycode) {
|
| - return usb_keycode == kUsbLeftControl ||
|
| - usb_keycode == kUsbLeftShift ||
|
| - usb_keycode == kUsbLeftAlt ||
|
| - usb_keycode == kUsbLeftOs ||
|
| - usb_keycode == kUsbRightControl ||
|
| - usb_keycode == kUsbRightShift ||
|
| - usb_keycode == kUsbRightAlt ||
|
| - usb_keycode == kUsbRightOs;
|
| +bool IsModifierKey(ui::DomCode dom_code) {
|
| + return dom_code == ui::DomCode::CONTROL_LEFT ||
|
| + dom_code == ui::DomCode::SHIFT_LEFT ||
|
| + dom_code == ui::DomCode::ALT_LEFT ||
|
| + dom_code == ui::DomCode::OS_LEFT ||
|
| + dom_code == ui::DomCode::CONTROL_RIGHT ||
|
| + dom_code == ui::DomCode::SHIFT_RIGHT ||
|
| + dom_code == ui::DomCode::ALT_RIGHT ||
|
| + dom_code == ui::DomCode::OS_RIGHT;
|
| }
|
|
|
| // Pixel-to-wheel-ticks conversion ratio used by GTK.
|
| @@ -314,7 +314,7 @@ void InputInjectorX11::Core::InjectKeyEvent(const KeyEvent& event) {
|
| if (event.pressed()) {
|
| if (pressed_keys_.find(keycode) != pressed_keys_.end()) {
|
| // Ignore repeats for modifier keys.
|
| - if (IsModifierKey(event.usb_keycode()))
|
| + if (IsModifierKey(static_cast<ui::DomCode>(event.usb_keycode())))
|
| return;
|
| // Key is already held down, so lift the key up to ensure this repeated
|
| // press takes effect.
|
|
|