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

Modern XTerm CSI-u key reporting #671

Open
gdamore opened this issue Dec 10, 2023 · 1 comment
Open

Modern XTerm CSI-u key reporting #671

gdamore opened this issue Dec 10, 2023 · 1 comment

Comments

@gdamore
Copy link
Owner

gdamore commented Dec 10, 2023

One of the problems people complain about is that it is impossible to discriminate between e.g. Ctrl-I and TAB, because of the UNIX heritage of TTYs.

There is now a quasi-standard protocol for enhanced reporting called CSI-u. We should implement this protocol -- at least the portion that will allow better and more accurate key reporting.

This is not an attempt to add KeyRelease and KeyRepeat reporting to tcell -- as I have no intention of doing that particular thing because of the deep semantic break for applications. But separating out the key types is incredibly useful.

Note that some of the constants for some keys are overlaid so that Ctrl-I is actually reported with the same code as Tab. We will need to look at breaking that up. Probably the old KeyCtrlXX symbols will be retired, because they are just not useful. (Even in new style reporting, for any ctrl key that doesn't have a better name we should just report it as a modified rune.)

This is probably one of the more often requested features of tcell.

One challenge is verifying support for it. #500 has some relevant information as well.

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

1 participant