termux / termux-app

Termux - a terminal emulator application for Android OS extendible by variety of packages.
https://f-droid.org/en/packages/com.termux
Other
36.37k stars 3.82k forks source link

[Bug]: with a hardware keyboard, random missing key presses / keys swapped #3100

Open vinc17fr opened 1 year ago

vinc17fr commented 1 year ago

Problem description

With the hardware keyboard of the Astro Slide 5G Transformer, I get random missing key presses. Sometimes, the same character appears twice (but this is quite rare).

This issue doesn't occur with other applications. And it doesn't occur with Termux + an on-screen keyboard.

Steps to reproduce the behavior.

Use the keyboard. All keys seem to be affected. For instance, when retyping the first paragraph above in Termux (using cat > foo), I got:

Wh the hardwre keyboard f he Astro Slide 5G Transfomer, I getdm missing key presses. Sometimsethe asmearacter pearstice(but this is quite rare)

Note also that, as seen above, characters are also sometimes swapped. This makes the hardware keyboard unusable with Termux.

What is the expected behavior?

No response

System information

agnostic-apollo commented 1 year ago

In the termux app debugging settings, you can enabled Terminal View Key Logging toggle and then see if and what events termux is actually receiving via logcat command. Bumping to Verbose log level will also log other info.

https://github.com/termux/termux-app#Debugging

If events are in order and terminal output is wrong, then there could potentially be some synchronization issue. If events are not in order, then issue would with android or keyboard. Not sure if someone else has experienced this.

vinc17fr commented 1 year ago

The events are missing in the log, i.e. the log seems to match what I get in the terminal.

It seems that the Messaging application has the same kind of issue, but much less often. But for instance, I couldn't reproduce it at all with Termius.