termux-app
termux-app copied to clipboard
CTRL + space bar should become CTRL-@
According to showkey -a
, some keys are not registered or don't have the same output as a desktop terminal (both a bare console and XTerm).
When CTRL+2 is pressed, the output is:
^@ 0 0000 0x00
This is the correct behavior.
When CTRL+@ (CTRL+shift+2) is pressed, the output is:
@ 64 0100 0x40
This is not correct, it should be the same as CTRL+2 (this is the same behavior as other CTRL+shift+num, which are all incorrect).
CTRL+space is not registered by the terminal (i.e.,nothing is printed). This is also not correct, it should have the same output as CTRL+2.
I use these keys frequently, so pretty please support it.
For me:
Ctrl+Space
sends ^@
Ctrl+@
and Ctrl+Shift+2
sends @
Ctrl+2
sends nothing
If it makes a difference, I'm typing this on a physical keyboard. Is there a way to collect logs for this that I can post here?
Pretty sure this will depend on the layout of your physical keyboard, and the selected language/layout of the keyboard in android settings. What type of keyboard are you using?
Is there a way to collect logs for this that I can post here?
You can get more information about keys and how termux interprets them through long press -> settings -> Termux -> Debugging -> Terminal View Key Logging. Then run logcat
in a separate terminal (preferably in an SSH shell from another machine to decrease noise)
After much messing around, I have learned two things. I compared the device with this issue (Meta Quest 3) with my phone (Pixel 8). CTRL+space works on the pixel, but fails on the Quest. On the Quest for some reason numlock is set (my keyboard has no numpad or numlock key). The output of CTRL+2 vs CTRL+@ is opposite between the two (CTRL+2 => ^@
on the Quest, but 2
on the Pixel). The big difference though is that the Quest requires setting ctrl-space-workaround
in termux.properties
.
In light of that, I'd ask two things with this ticket:
- if there are system-wide device specific settings for
ctrl-space-workaround
, please add the Quest to that list. - CTRL+2 and CTRL+@ should behave the same, and both produce
^@
Is this able to be resolved?