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

invalid character input after ctrl+g input #74

Open
CyanMARgh opened this issue Nov 10, 2023 · 1 comment
Open

invalid character input after ctrl+g input #74

CyanMARgh opened this issue Nov 10, 2023 · 1 comment

Comments

@CyanMARgh
Copy link

if you enter ctrl+g and press by mistake, for example, F1, then ĉ will be entered into the terminal. The bug was discovered when i replaced default navigation keys with wasd in the config. The characters A/B/C/D were entered into the console when i pressed the arrows by mistake. I would like that when entering an invalid command, nothing would be printed.

@Kieran-Weaver
Copy link

Normal invalid commands do display nothing. Your bug won't be seen during normal usage because it doesn't happen with any of the normal keys, only special keys like the arrow keys and the F keys.

The reason this is happening is that the terminal representation for the arrow keys is longer than just one character. You can figure this out by doing ctrl-V and then pressing one of them in the terminal:

Left:  ^[ [ D
Right: ^[ [ C
Up: ^[ [ A
Down: ^[ [ B

where
^[ is escape.

To mtm, ctrl-G, left arrow is an invalid command. it's ctrl-G, [, then a D.

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

2 participants