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?
jasimon9Asked:
Who is Participating?
 
patspamCommented:
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
"\e[H":beginning-of-line
"\e[F":end-of-line
# rxvt and konsole (i.e. the KDE-app...)
"\e[7~":beginning-of-line
"\e[8~":end-of-line

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: http://www.ibb.net/~anne/keyboard.html

I found that link from here: http://staff.washington.edu/leftwing/wordpress/2005/11/30/home-and-end-keys-putty-bash-linux/ (the export term=LINUX there didn't work for me).

Regards,

Patrick
0
 
gheistCommented:
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.
0
 
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.
0
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.

 
gheistCommented:
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.
0
 
gheistCommented:
Some preferred MindTerm from AppGate.se.
0
 
jasimon9Author Commented:
I have seen several references to SecureCRT, so I will investigate that option, as well as MindTerm.
0
 
gheistCommented:
No bash on FreeBSD yet or ever.
0
 
patspamCommented:
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: http://www.freebsd.org/cgi/url.cgi?ports/shells/bash2/pkg-descr
0
 
jasimon9Author Commented:
Brilliant!

Exactly what I was looking for.
0
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.