Bug: Ctrl+[
is encoded ^[[91;5u
, and not ^[
as specified in Kitty Keyboard Protocol.
#5071
Replies: 4 comments 4 replies
-
To add to the above, I changed the keybinding for Turns out, in ghostty Further research reveals that an ANSII sequence "...containing the parameter bytes <=>? or the final bytes 0x70–0x7E (p–z{|}~) are private", i.e. "...so that terminal manufacturers could insert their own sequences without conflicting with the standard. ". In other words, Googling that sequence however, shows that e.g. Mintty has an option to turn usage of In the Is there a way to turn that feature off, so |
Beta Was this translation helpful? Give feedback.
-
In the xterm discussion linked above, where , there is a link to a proposed solution called "fixterm", to distinguish I initially hacked around the issue by forcing ghostty to send Thus, I moved over to mapping |
Beta Was this translation helpful? Give feedback.
-
After further research, it seems to be a bug in Ghostty, that the key press We know from the Ghostty dev log, that the terminal supports the Kitty Keyboard Protocol (KKP). Further, we can check if any progressive enhancements from KKP is enabled in our shell, ZSH in my case, with In the Legacy key event encoding:
Which in turn tell us that If we turn on KKP progressive enhancement level 1, by issuing In other words, following the KKP, without progressive enhancements, Ghostty should not encode PS 1: I also verified that xterm's PS 2: CSI-u/fixterms/libtickit is not used either, as far as I can tell. |
Beta Was this translation helpful? Give feedback.
-
I just had a discussion with the tmux contributors re. Regardless, I included my own temporary fix over there. In case helpful to others, here is the link: Request for tmux to support |
Beta Was this translation helpful? Give feedback.
-
EDIT: Skip to the last post for the bug report, the previous two posts contain background research leading up to the last post.
^[
in ZSH, i.e. the Escape ASCII code which I use to enter Normal mode (vicmd
) from Insert mode (viins
), will undo everything that was just entered in Insert mode.Are others seeing the same behavior? Is there any way to change that behavior, so entering Normal mode with
^[
keeps what was inserted?Note that the regular
ESC
key on the keyboard, i.e. notctrl+[
, works without undoing what was just inserted, and I have yet to figure out why the two differs. I was under the impression thatESC
actually just sends^[
to the terminal, under the hood.It does not happen in e.g. Wezterm.
Beta Was this translation helpful? Give feedback.
All reactions