How to have different escapes for Ctrl+key and Ctrl+Shift+key #611

Open
opened 2026-01-30 21:56:50 +00:00 by claunia · 0 comments
Owner

Originally created by @andb0t on GitHub (Apr 9, 2019).

  • Your Windows build number: (Type ver at a Windows Command Prompt)

Microsoft Windows [Version 10.0.17134.648]

  • What you're doing and what's happening: (Copy & paste specific commands and their output, or include screen shots)

I am using WSL with zsh and have a nice list of keybindings, using e.g. bindkey "^K" kill-line to bind pressing "Ctrl+k" to deleting all text from the cursor position to the EOL, like I have it in my atom text editor. I would now like to bind "Ctrl+Shift+k" to delete the entire line. Unfortunately, the WSL terminal has the same escape sequence for both, so it cannot detect the difference. I checked that using using sed -n l. How can I configure WSL to have different escape sequences?

Is it xterm below? If yes, can I just configure the underlying xterm to do what I want, e.g. in a .Xresources file?

  • What's wrong / what should be happening instead:

I would have expected different escape sequences, such that I can bind different zsh widgets to them

Originally created by @andb0t on GitHub (Apr 9, 2019). > * Your Windows build number: (Type `ver` at a Windows Command Prompt) Microsoft Windows [Version 10.0.17134.648] > * What you're doing and what's happening: (Copy & paste specific commands and their output, or include screen shots) I am using WSL with zsh and have a nice list of keybindings, using e.g. `bindkey "^K" kill-line` to bind pressing "Ctrl+k" to deleting all text from the cursor position to the EOL, like I have it in my atom text editor. I would now like to bind "Ctrl+Shift+k" to delete the entire line. Unfortunately, the WSL terminal has the same escape sequence for both, so it cannot detect the difference. I checked that using using `sed -n l`. How can I configure WSL to have different escape sequences? Is it xterm below? If yes, can I just configure the underlying xterm to do what I want, e.g. in a `.Xresources` file? > * What's wrong / what should be happening instead: I would have expected different escape sequences, such that I can bind different zsh widgets to them
claunia added the Issue-FeatureProduct-ConhostNeeds-Tag-FixArea-Interaction labels 2026-01-30 21:56:51 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#611