Skip to content
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

CTRL + space bar should become CTRL-@ #3896

Open
natebragg opened this issue Mar 25, 2024 · 4 comments
Open

CTRL + space bar should become CTRL-@ #3896

natebragg opened this issue Mar 25, 2024 · 4 comments

Comments

@natebragg
Copy link

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.

@ErrrorMaxx
Copy link

ErrrorMaxx commented Mar 25, 2024

For me:
Ctrl+Space sends ^@
Ctrl+@ and Ctrl+Shift+2 sends @
Ctrl+2 sends nothing

@natebragg
Copy link
Author

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?

@Grimler91
Copy link
Member

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)

@natebragg
Copy link
Author

natebragg commented Mar 27, 2024

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:

  1. if there are system-wide device specific settings for ctrl-space-workaround, please add the Quest to that list.
  2. CTRL+2 and CTRL+@ should behave the same, and both produce ^@

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants