-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Add "libtermkey" key bindings preset #213
base: master
Are you sure you want to change the base?
Conversation
libtermkey is interesting; I haven't had time to try this out yet, but it must be limited to some subset of the full libtermkey spec. Maybe this should be done in code, not as a preset, in order to make handling all key combos tractable. This goes with gitlab issue 3519 |
Yeah, I thought so to. This is more like temporal quick fix. It fixes issues like neovim/neovim#2048 and others. But implementing all possible combinations for libtermkey would be awesome (keys bindings would not be needed in this mode...). |
It looks like libtermkey doesn't want a CSI code for ctrl-h based on this page: http://www.leonerd.org.uk/hacks/fixterms/
Remapping C-h to a CSI code breaks command line editing, for example. What I don't understand is why so many people have C-h sending (which I presume is 0x7f). C-h should always send 0x08. |
@leonerd, can you provide any color on the C-h vs. issues above? |
What sort of input are you looking for? In an ideal world Every Single Terminal would encode as the 0x07 byte (BS), as DEL (0x7f), and as CSI 2~. It would also explain this in its own terminfo file. Then everything would work just fine. The annoying reality of the world is that most terminfo files still claim that the Backspace key sends the ASCII BS byte, but yet programs tend to ignore that. This is the cause of the current problem - libtermkey actually believes the terminfo file to be right. A shocking concept perhaps... I personally don't know what would be best - I can't make everyone go and fix their terminfo files. I don't know if continuing the precedent of starting to ignore what terminfo says and having parsers say "I know better" is a good idea or not. |
No. Terminfo files describe the behaviour of a terminal. There isn't "one canonical correct" one any more than there is "one canonical correct" terminal. The TI file should match the behaviour of the terminal. That is first and foremost. However, additionally it would be nice if certain properties held; such as the key encodings of the keys I mentioned above. That is a matter initially for the terminal to behave in such a manner, so that its TI file can document it. |
See #3519