Skip to main content
explained how to procure the key sequence in greater detail
Source Link
alecdwm
  • 441
  • 4
  • 6

Answering because this was the first DDG result in searching for the same issue.

FirstFirst, you need to get the code for the delete key.

Go to your shell prompt, for example:

alec@su:~$

Execute the 'cat' program, which you needwill use to get thedetermine which code for the deletecorresponds to your 'delete' key.
Execute

alec@su:~$ cat

Press 'delete' on your keyboard and cat will display the corresponding code.

alec@su:~$ cat
^[[3~

You may need to press 'enter' to display the code. I did not.

Finally, press delete, enter and Ctrl+C'Ctrl+C' to send a SIGTERM signal to cat (i.e. to quit the program execution)

alec@su:~$ cat
^[[3~^C
alec@su:~$ cat

Now, you just need to configure zsh.

For me, delete sends ^[[3~, so I can put the following into my .zshrc file:

bindkey "^[[3~" delete-char

Restart zsh and you should be good to go! :)

Answering because this was the first DDG result in searching for the same issue.

First, you need to get the code for the delete key.
Execute cat, press delete, enter and Ctrl+C.

For me, delete sends ^[[3~, so I can put the following into my .zshrc file:

bindkey "^[[3~" delete-char

Answering because this was the first DDG result in searching for the same issue.

First, you need to get the code for the delete key.

Go to your shell prompt, for example:

alec@su:~$

Execute the 'cat' program, which you will use to determine which code corresponds to your 'delete' key.

alec@su:~$ cat

Press 'delete' on your keyboard and cat will display the corresponding code.

alec@su:~$ cat
^[[3~

You may need to press 'enter' to display the code. I did not.

Finally, press 'Ctrl+C' to send a SIGTERM signal to cat (i.e. to quit the program execution)

alec@su:~$ cat
^[[3~^C
alec@su:~$ cat

Now, you just need to configure zsh.

For me, delete sends ^[[3~, so I can put the following into my .zshrc file:

bindkey "^[[3~" delete-char

Restart zsh and you should be good to go! :)

Source Link
alecdwm
  • 441
  • 4
  • 6

Answering because this was the first DDG result in searching for the same issue.

First, you need to get the code for the delete key.
Execute cat, press delete, enter and Ctrl+C.

For me, delete sends ^[[3~, so I can put the following into my .zshrc file:

bindkey "^[[3~" delete-char