Tilde in Konsole when DEL is pressed

An annoying config error that has taken the last 3 hours to fix: When trying to delete with the DELETE or DEL key in one of Xterm, Gnome-terminal or Konsole I got the character deleted but also replaced with a tilde (~)

I ignored this for ages because the descriptions about consoles and keymapping all seemed rather tedious and had better things to do. But I’ve had a recent surge of enthusiasm to get things out of the way even if it takes me forever. Mainly because I need closure (somewhat like disgruntled ex-lovers sometimes need) so after spending hours on something I can least say I solved the problem! Instead of saying I wasted hours becoming frustrated.

The fix goes like this (note that alot of info was taken from here):


$ bind -p | grep "delete-char"


"\C-h": backward-delete-char
"\C-?": backward-delete-char
"\C-d": delete-char
"\M-[3": delete-char
# delete-char-or-list (not bound)
# forward-backward-delete-char (not bound)

We can see that the entry for the delete code is there…(“\M-[3”: delete-char) however it isn’t complete. There is meant to be a tilde on the end. The reason I’m seeinga tilde when I delete is because readline scans only part of the DELETE ascii code leaving the tilde behind.


 cat "\"\\e[3~\": delete-char" >> ~/.inputrc

Then restart terminal/session.

I have no idea how/why this is screwed up though. I think it happened after a debian upgrade and by default I don’t overwrite changed configuration files. One of my custom configurations were probably not compatible with a new dependent config…


There are no comments yet...Kick things off by filling out the form below..

Leave a Comment