Skip to content

Is CTRL+Number supported as a "hot-key"? #188

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

Closed
triddell opened this issue Jan 12, 2018 · 4 comments
Closed

Is CTRL+Number supported as a "hot-key"? #188

triddell opened this issue Jan 12, 2018 · 4 comments
Labels

Comments

@triddell
Copy link

I'm beginning to use tcell by working with the new tview project.

For example, one of their demos uses "tcell.KeyCtrlN" for a CTRL-N hot-key. Do you know if tcell supports something like CTRL-1, CTRL-2, etc? I couldn't find this by looking at the code but I'd like to use this in my application if possible.

Thanks.

@gdamore
Copy link
Owner

gdamore commented Jan 13, 2018

So CTRL+ is not supported generically by most terminals (meaning that they don't send anything useful that is distinct from other things). For example, iTerm seems to send other sequences associated with ESC, or just bare numbers, depending on which one you type.

The thing is that the "standards" (such as they are) really have no way to express these.

I suspect we can probably do better for Windows, but my initial tests there are not promising.

I don't recommend using ctrl with digits; you will find that your application will be very limited where those actually do anything (if such a place even exists).

@gdamore
Copy link
Owner

gdamore commented Apr 15, 2018

This is a question, and nothing I can do code wise about it. Closing it.

@gdamore gdamore closed this as completed Apr 15, 2018
@makew0rld
Copy link

What about Alt+NUMBER?

@gdamore
Copy link
Owner

gdamore commented Jun 7, 2020

Sadly no. Maybe on Windows. But definitely not on the other platforms.

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

No branches or pull requests

3 participants