Chromium Code Reviews| Index: remoting/client/jni/chromoting_jni_instance.cc |
| diff --git a/remoting/client/jni/chromoting_jni_instance.cc b/remoting/client/jni/chromoting_jni_instance.cc |
| index 9c0fae7eb0872fd730e9d6d267a85d6e8d76dd6d..d1b8fbba40af4d46e7e5d6538b40a510eedc1f57 100644 |
| --- a/remoting/client/jni/chromoting_jni_instance.cc |
| +++ b/remoting/client/jni/chromoting_jni_instance.cc |
| @@ -25,6 +25,7 @@ |
| #include "remoting/protocol/negotiating_client_authenticator.h" |
| #include "remoting/protocol/network_settings.h" |
| #include "remoting/signaling/server_log_entry.h" |
| +#include "ui/events/keycodes/dom/keycode_converter.h" |
| namespace remoting { |
| @@ -229,10 +230,16 @@ void ChromotingJniInstance::SendMouseWheelEvent(int delta_x, int delta_y) { |
| client_->input_stub()->InjectMouseEvent(event); |
| } |
| -bool ChromotingJniInstance::SendKeyEvent(int key_code, bool key_down) { |
| - uint32 usb_key_code = AndroidKeycodeToUsbKeycode(key_code); |
| +bool ChromotingJniInstance::SendKeyEvent(int scan_code, |
| + int key_code, |
| + bool key_down) { |
| + // For software keyboards |scan_code| is set to 0, in which case the |
|
Lambros
2015/09/08 23:39:44
in which case the ... what?
Sergey Ulanov
2015/09/09 00:30:06
Done.
|
| + uint32_t usb_key_code = |
| + scan_code ? ui::KeycodeConverter::NativeKeycodeToUsbKeycode(scan_code) |
| + : AndroidKeycodeToUsbKeycode(key_code); |
| if (!usb_key_code) { |
| - LOG(WARNING) << "Ignoring unknown keycode: " << key_code; |
| + LOG(WARNING) << "Ignoring unknown key code: " << key_code |
| + << " scan code: " << scan_code; |
| return false; |
| } |