-
-
Notifications
You must be signed in to change notification settings - Fork 679
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
Review and adopt http://www.leonerd.org.uk/hacks/fixterms/ #63
Comments
See http://www.leonerd.org.uk/hacks/fixterms/ for the specification. Refs: #63
I keep holding shift while pressing space and seeing stuff get undone in vim. Super annoying. I didn't see a good way to teach applications about this via terminfo, so this is off by default for now. refs: #63
Previously we would try to pass through the Backspace and Delete code points without interference, but that behavior wasn't quite right. With this commit our behavior is now: - At the window layer: Classify a `Backspace` key press as logically `BS` and a `Delete` key press as logically `DEL` unless the `swap_backspace_and_delete` is true (macOS is true by default), in which case `Backspace` is mapped to `Delete` and vice versa. - At the terminal input layer: A `Backspace` input from the Window sends the `DEL` sequence to the pty as that matches the default `VERASE` stty configuration. A `Delete` input from the Window emits `\033[3~`, which matches up to the `TERMINFO` for `xterm-256color` which we claim to be compatible with, and is our default `$TERM` value. The net result of this is that `Backspace` will now start to emit `^?` which should match folks stty verase. Heads up to @fanzeyi! I've tested this only on a linux system so far and will follow up on a macOS system a little later today. Refs: #88 Refs: #63
This was originally intended to be swept in and dealt with as part of adopting CSI-u (refs: #63) but the default shift-space mapping is super irritating in vim (refs: #126) so it got partially walked back, but as a consequence we accidentally dropped the modifiers from those keys (refs: #213 refs: #214). This commit restores the modifiers for that case. In addition, since we now have a way to plumb configuration directly into the term crate, this adds a config option to enable CSI-u for those that want to use it.
Hello, with the latest commits, what is missing to be complete? |
I think this is probably done, but would appreciate feedback from someone that would notice the difference! I believe that neovim will natively recognize CSI-u key bindings. There probably should be a terminfo variant for CSI-u. |
What's left to call this done is to review this doc and verify that we're conforming when csi-u mode is enabled: |
Hello, I was wondering how to see the list of options and their default values. I was looking for CSI u mode and was only able to find a reference in the change log to enable it.
return {
enable_csi_u_key_encoding = true
} |
Ideally, the docs will have a clear section on each option. I try to make a point of covering the major features as they are completed. In this case, it's not quite complete because it does require making another pass over the spec and then writing up the docs; one of the other items on my list here is work in progress in documenting all of the supported escape sequences input and output, and this is related. If you wanted to go snooping for options, it's slightly awkward because the definition in code is in Rust, and there's a little bit of automated translation from lua. If you prefer reading code, the |
Kitty adopted a slightly different version of fixterms, according to them:
|
Thanks for this. I was trying to do this manually yesterday, and didn't see WezTerm's flag for this. For some keys WezTerm appears to have not implemented the spec for:
|
This page has a plan for fixing input in terminals:
http://www.leonerd.org.uk/hacks/fixterms/
The text was updated successfully, but these errors were encountered: