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+I comes across as Tab #204

Closed
joegrasse opened this issue Apr 6, 2018 · 2 comments
Closed

Ctrl+I comes across as Tab #204

joegrasse opened this issue Apr 6, 2018 · 2 comments

Comments

@joegrasse
Copy link

In the mouse demo, if I push Ctrl+I it comes across as Tab (on linux) or Ctrl+Tab (on windows). Not Ctrl+I, which is what I would expect.

@gdamore
Copy link
Owner

gdamore commented Apr 6, 2018

This is fairly fundamental because tcell cannot tell the difference. Indeed, there are a bunch of other control keys that are indistinguishable from special keys. For example, CTRL-M sends a carriage return and CTRL-H sends a backspace. This is fundamental to how control keys are represented within ASCII and expressed over ttys. (GUI apps can see different values here because they see raw key codes instead.)

The moral of the story is, don't depend too much on control keys meaning anything in your app. There are a many that are safe, but a number of them are not.

At any rate, there is absolutely nothing that a terminal program can do to tell the difference here. Sorry.

@gdamore gdamore closed this as completed Apr 6, 2018
@joegrasse
Copy link
Author

Thanks for the feedback.

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