-
Notifications
You must be signed in to change notification settings - Fork 10.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Key mapping issue with AZERTY keyboard #4096
Comments
Here is the changelog of 1.15: https://github.com/Genymobile/scrcpy/releases/tag/v1.15 The difference is probably that Shift is forwarded to the device. I use an AZERTY keyboard both on my computer and on the device, it works perfectly for me 😕 What is your computer keyboard layout? What is your device keyboard app? Does the problem also occur with another device keyboard app? Run
What is the output in your console? Here is my result:
|
Hi, With Verbose, here is my result: How do we explain that with scrcpy version lower than 1.15, the mapping is correct even with Microsoft SwiftKey keyboard app? |
👍
That is correct. There is a confusion with the Shift key by your keyboard app the way scrcpy is injecting events.
Because before v1.15, scrcpy did not forward Shift to the device, so this did not trigger the issue. I added a log: diffdiff --git a/server/src/main/java/com/genymobile/scrcpy/Controller.java b/server/src/main/java/com/genymobile/scrcpy/Controller.java
index 59fae6024..1cae937b4 100644
--- a/server/src/main/java/com/genymobile/scrcpy/Controller.java
+++ b/server/src/main/java/com/genymobile/scrcpy/Controller.java
@@ -192,6 +192,7 @@ public class Controller implements AsyncProcessor {
return false;
}
for (KeyEvent event : events) {
+ Ln.i("=== " + event);
if (!device.injectEvent(event, Device.INJECT_MODE_ASYNC)) {
return false;
} Could you please replace this binary in the scrcpy v2.0 folder:
Run |
I have replaced your binary scrcpy-server in my scrcpy v2.0 folder. Here is the result: With Gboard keyboard app: I press shift 1, and the screen displays "1" I don't see a lot of differences between the 2 [server] INFO... |
For information, I tried other keyboard applications such as "Typewise", "Yandex Keyboard", "Bobble Keyboard", and they work correclty. Pressing Shift 1, displays "1". |
OK, so probably Microsoft Switfkey incorrectly interpret the shift state when it should only consider the keycode :/ |
Should-it be possible to run scrcpy with an option to not forward "Shift" to the device? |
Shift is useful for text selection for example (Shift+left/right). That would add another option for shift (and maybe yet other options for other keys), just because one keyboard app does not handle it correctly :/ Maybe it should be reported to that keyboard app so that it is fixed on their side? |
Hi there, thx a lot for your great app :) I've got the exact same issue than pidobeuliou with Swiftkey. Like pidobeuliou said in his description, there may be an confusion between azerty and qwerty keyboard... I don't understand why shift key would be the cause...? |
Environment
Describe the bug
Up to scrcpy-win64-v1.14, the keyboard mapping with AZERTY keyboard is perfect. All characters are displayed correcly on the smartphone, even with accents.
From scrcpy-win64-v1.15 up to the last version scrcpy-win64-v2.0, the keyboard mapping with AZERTY keyoard presents the following bug:
The keys 1, 2, 3, 3 (upper keys above the first line of characters azerty) are not well mapped. The displayed characters on the Smartphone correspond to the QWERTY keyboard: ! in place of 1, @ in place of 2, # in place of 3, etc.
Some others keys are also not correctly mapped: > in place of "."
The text was updated successfully, but these errors were encountered: