Genymobile / scrcpy

Display and control your Android device
Apache License 2.0
110.25k stars 10.57k forks source link

Not possible to type non-ASCII characters in Termux via scrcpy #2628

Open LeGuipo opened 3 years ago

LeGuipo commented 3 years ago

Environment

Describe the bug I have no idea if it's really related to scrcpy, or adb, or termux itself, or my device… Anyway typing French text from my computer's keyboard usually works fine, but the Termux terminal emulator doesn't show non-ASCII characters like é è ç (ex: é is replaced by e, ç doesn't do anything). Some characters even execute key sequences that can mess up things.

The virtual keyboard works fine and a real hardware keyboard directly plugged into the device too.

rom1v commented 3 years ago

I have no idea if it's really related to scrcpy, or adb, or termux itself, or my device…

It's related to a limitation of Android with text injection the way it is done via scrcpy: https://github.com/Genymobile/scrcpy/blob/master/FAQ.md#special-characters-do-not-work

the Termux terminal emulator doesn't show non-ASCII characters like é è ç

The accented characters are injected via several separate chars (which is a bit hacky): https://blog.rom1v.com/2018/03/introducing-scrcpy/#handle-accented-characters I'm not surprised that it is not handled properly in termux.

LeGuipo commented 3 years ago

Thanks for the explanation. I did not read the FAQ carefully enough obviously.