FreeBSD putty delete key

I am using putty to connect to a FreeBSD system. I would like the delete key to operate by deleting the character under the cursor and leaving the cursor in the same posiion.

Instead, it causes a beep and inserts a hyphen ("-"). <-- not a smiley, showing the hyphen.

This happens no matter what keyboard emulation or setting I have in putty (except that SCO emulation makes it act like the backspace key).

I believe that putty it is trying to insert ESC- for the delete key . The backspace works normally.

Is there a stty setting that I can use to enable "proper" delete key functioning?
Who is Participating?
That's been bugging me for ages to, your question prompted me to find the solution. I hope you enjoy it as much as I do now ;)

Caveat: this is a solution for the Bash shell (which I assume you are using). If you're using another shell, follow the link at the bottom for other workarounds.

Create a file, /etc/inputrc for system wide use or ~/.inputrc for personal use. Actually, this is the readline initialization file, readline is a library that some programs (bash, kvt) use to read input (try bind -v to see a list of readline key and function bindings). Cut and paste the following in the file to make the Delete key delete characters under the cursor, and make Home and End work as well:

"\e[3~": delete-char
# this is actually equivalent to "\C-?": delete-char
# VT
"\e[1~": beginning-of-line
"\e[4~": end-of-line
# kvt
# rxvt and konsole (i.e. the KDE-app...)

I did it with a local ~/.inputrc. Log in again and enjoy. (The solution will also fix the Home/End keys)

You can find out everything you could every want to know about the Delete/Backspace keys on linux here:

I found that link from here: (the export term=LINUX there didn't work for me).


Putty as installed on FreeBSD constantly inserts Esc[n~ no matter keyboard config tickmarks , which is fine by Linux, but not good with anything else.
jasimon9Author Commented:
It sounds like you are suggesting that no correction of this condition can be made. If so, I am open to suggestions as to other ssh clients.
Cloud Class® Course: CompTIA Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

On FreeBSD you can use shipped OpenSSH client instead of PuTTY. It certainly has same terminal capabilities as another FreeBSD system holding ssh server.
Last time I routinely used windows best client around was SecureCRT from VanDyke company.
Some preferred MindTerm from
jasimon9Author Commented:
I have seen several references to SecureCRT, so I will investigate that option, as well as MindTerm.
No bash on FreeBSD yet or ever.
Rubbish, it's in the ports tree. The fact that jasimon9 was having the same term/PuTTY problems as me makes me think he/she may be using bash like I am.

FYI, long description of the bash port here:
jasimon9Author Commented:

Exactly what I was looking for.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.