?
Solved

FreeBSD putty delete key

Posted on 2006-03-31
10
Medium Priority
?
2,703 Views
Last Modified: 2013-11-22
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?
0
Comment
Question by:jasimon9
  • 5
  • 3
  • 2
10 Comments
 
LVL 62

Expert Comment

by:gheist
ID: 16348834
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
 

Author Comment

by:jasimon9
ID: 16351526
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
 
LVL 62

Expert Comment

by:gheist
ID: 16369261
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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 62

Expert Comment

by:gheist
ID: 16369267
Some preferred MindTerm from AppGate.se.
0
 

Author Comment

by:jasimon9
ID: 16372755
I have seen several references to SecureCRT, so I will investigate that option, as well as MindTerm.
0
 
LVL 2

Accepted Solution

by:
patspam earned 500 total points
ID: 16584071
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
 
LVL 62

Expert Comment

by:gheist
ID: 16584776
No bash on FreeBSD yet or ever.
0
 
LVL 2

Expert Comment

by:patspam
ID: 16591919
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
 

Author Comment

by:jasimon9
ID: 16622674
Brilliant!

Exactly what I was looking for.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Attention: This article will no longer be maintained. If you have any questions, please feel free to mail me. jgh@FreeBSD.org Please see http://www.freebsd.org/doc/en_US.ISO8859-1/articles/freebsd-update-server/ for the updated article. It is avail…
In tuning file systems on the Solaris Operating System, changing some parameters of a file system usually destroys the data on it. For instance, changing the cache segment block size in the volume of a T3 requires that you delete the existing volu…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Suggested Courses
Course of the Month16 days, 19 hours left to enroll

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question