How to key bind 'backward-kill-line' to Ctrl+Shift+Backspace?
3
votes
2
answers
4164
views
I have used answer of [zsh kill Ctrl + Backspace, Ctrl + Delete](https://unix.stackexchange.com/a/12789/188538) 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.
Asked by ebosi
(295 rep)
Apr 4, 2019, 04:57 PM
Last activity: Apr 8, 2019, 03:01 PM
Last activity: Apr 8, 2019, 03:01 PM