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

Unified Diff: remoting/android/java/src/org/chromium/chromoting/jni/JniInterface.java

Issue 1321223003: Use scan codes when sending keyboard events froms physical keyboard. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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
Index: remoting/android/java/src/org/chromium/chromoting/jni/JniInterface.java
diff --git a/remoting/android/java/src/org/chromium/chromoting/jni/JniInterface.java b/remoting/android/java/src/org/chromium/chromoting/jni/JniInterface.java
index 2323a0ad3c8ea76b8747003745ba5ff1399db24b..3f592a07220f09494c7f16175d73870b2a21f45e 100644
--- a/remoting/android/java/src/org/chromium/chromoting/jni/JniInterface.java
+++ b/remoting/android/java/src/org/chromium/chromoting/jni/JniInterface.java
@@ -287,16 +287,18 @@ public class JniInterface {
private static native void nativeSendMouseWheelEvent(int deltaX, int deltaY);
/** Presses or releases the specified (nonnegative) key. Called on the UI thread. */
- public static boolean sendKeyEvent(int keyCode, boolean keyDown) {
+ public static boolean sendKeyEvent(int scanCode, int keyCode, boolean keyDown) {
if (!sConnected) {
return false;
}
- return nativeSendKeyEvent(keyCode, keyDown);
+ return nativeSendKeyEvent(scanCode, keyCode, keyDown);
}
- /** Passes key press information to the native handling code. */
- private static native boolean nativeSendKeyEvent(int keyCode, boolean keyDown);
+ /**
+ * Passes key press information to the native handling code. If scanCode is zero then keyCode
+ * is used, otherwise keyCode is ignored. */
Lambros 2015/09/08 23:39:44 s/keyCode is ignored/scanCode is used/ ? Maybe ad
Sergey Ulanov 2015/09/09 00:30:06 Done.
+ private static native boolean nativeSendKeyEvent(int scanCode, int keyCode, boolean keyDown);
/** Sends TextEvent to the host. Called on the UI thread. */
public static void sendTextEvent(String text) {

Powered by Google App Engine
This is Rietveld 408576698