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! :)