I have used answer of zsh kill Ctrl + Backspace, Ctrl + Delete to configure following key binding:
- Ctrl+Backspace: delete until the beginning of current word,
- Ctrl+Delete: delete until the end of current word,
- Ctrl+Shift+Delete: delete until the end of the line.
This have been done using these commands:
$ bindkey -M emacs '^[[3;5~' kill-word
$ bindkey -M emacs '^H' backward-kill-word
$ bindkey -M emacs '^[[3;6~' kill-line
To know how to encode the keys (i.e., the ^[[3;5~
part), I used the "trick" detailed in the answer: "type Ctrl+C Ctrl+Delete to see what the value is on your system".
Problem
I would like to bind Ctrl+Shift+Backspace to the backward-kill-line
command (i.e. delete everything between the cursor and the beginning of the line).
However, when I type Ctrl+C Ctrl+Shift+Backspace, my prompt only shows ^H
— i.e. the same key combination as Ctrl+Backspace.