-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Terminal should support libtickit style input #8719
Comments
This may be helpful inspiration: https://iterm2.com/documentation-csiu.html iTerm2 recently added a checkbox in their Preferences -> Profile -> Keys called "Report modifiers using CSI u". |
I'm just gonna re=purpose this as the general "Terminal should support Links: |
Paul Evans (the author of that link), described it as "less a spec, and more of an inane rant". 😄 There was talk of creating a proper spec for it at some point in terminal-wg, but I don't think anything ever came of that. I do know that the current "spec" was considered problematic (it apparently isn't compatible with Xterm and breaks certain function keys in vim and emacs). Just FYI. |
CSI-u seemed to be like "as standard as it gets" :) But yeah, I'm not super well versed into what's actually most standard out there.. I did want to simply be able to distinguish CSI-u + Anyhow, as a user, all I really want is to be able to distinguish |
I don't believe this is the case. Edit: corrected attribution in the following paragraph. My understanding is that support was added to xterm by @ThomasDickey (as proposed by @leonerd) in xterm patch #235 (released 2008/04/20):
To quote those two xterm resources docs:
So See also: https://invisible-island.net/xterm/modified-keys.html As @zsimic points out, iTerm2 (macOS terminal emulator, I'd guess used by 99.9% or more of macOS developers) added support (Jan 1, 2019): https://groups.google.com/g/iterm2-discuss/c/KpSlgnY_zxw?pli=1 That's documented here: https://iterm2.com/documentation-csiu.html Support was added in vim v8.1.2134. You can read about the feature in
Vim recognizes xterm's original CSI 27 encoding (as devised by @ThomasDickey et al) as well as the CSI u encoding (proposed by @leonerd): https://github.com/vim/vim/blob/6a0299d8f4c7a64c64d60a6bb39cfe6eaf892247/src/term.c#L4539-L4541 The The |
leonerd's contribution was a description of the change; he has contributed no actual source-code to xterm. |
@ThomasDickey my apologies. I misread your
as suggesting that this was his third implementation, after him having done xterm and mintty. Sleepy and not reading close enough. I've amended my comment to correct that. |
Environment
Steps to reproduce
Open a new tab with a shell from ubuntu 20.04, run
showkey -a
, then hitbackspace
, thenshift+backspace
etc, WT sends:0x7f
forbackspace
0x08
forctrl+backspace
0x7f
forshift+backspace
0x7f
forctrl+shift+backspace
(hit
ctrl+d
to end theshowkey -a
session)Expected behavior
Expecting to be able to distinguish modifier + backspace key presses.
I like to make it so that
ctrl+backspace
deletes previous word, andctrl+shift+backspace
deletes everything preceding the cursor. I do so via~/.inputrc
, which works on most VT terminals:I was able to make it work easily by adding this to my
settings.json
in WT:Actual behavior
WT does not seem to distinguish modifier + backspace key presses (at least not in WSL).
The text was updated successfully, but these errors were encountered: