LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > *BSD
User Name
Password
*BSD This forum is for the discussion of all BSD variants.
FreeBSD, OpenBSD, NetBSD, etc.

Notices

Reply
 
LinkBack Search this Thread
Old 11-20-2004, 01:10 AM   #1
mdixon
LQ Newbie
 
Registered: Oct 2003
Location: Perth, Western Australia
Distribution: Fedora & FreeBSD
Posts: 14

Rep: Reputation: 2
Question End & Home keys for Bash on FreeBSD


How do I configure the keyboard on a terminal session?

I connect to a new FreeBSD box via OpenSSH (in PuTTY). My shell is BASH. The Delete, End and Home keys just type a tilde ("~") instead of doing what I expect. How do I change this to make the End key jump to the end of the command line, the Home key jump to the beginning and the Delete key delete the currently highlighted character on the command line.

Software:
FreeBSD 5.3-RELEASE (i386 on a Pentium II)
PuTTY Release 0.53b / OpenSSH 3.8.1pl
GNU Bash 2.05b.0(1)-release
 
Old 11-20-2004, 03:54 AM   #2
nixcraft
Member
 
Registered: Nov 2004
Location: BIOS
Distribution: RHEL3.0, FreeBSD 5.x, Debian 3.x, Soaris x86 v10
Posts: 379

Rep: Reputation: 30
Here is my ~/.inputrc (create this file in your home dir); only works if your shell is BASH and add following two line :

Code:
"\e[1~": beginning-of-line
"\e[4~": end-of-line
You can also create /etc/inputrc system wide file.
 
Old 11-20-2004, 03:59 AM   #3
nixcraft
Member
 
Registered: Nov 2004
Location: BIOS
Distribution: RHEL3.0, FreeBSD 5.x, Debian 3.x, Soaris x86 v10
Posts: 379

Rep: Reputation: 30
Sorry i forgot to add delete key code:

Code:
"\e[3~": delete-char
 
Old 11-20-2004, 05:44 AM   #4
mdixon
LQ Newbie
 
Registered: Oct 2003
Location: Perth, Western Australia
Distribution: Fedora & FreeBSD
Posts: 14

Original Poster
Rep: Reputation: 2
Thumbs up

Thanks Vivek / Nixcraft. That works perfectly. Cheers, Mark.
 
Old 11-20-2004, 08:57 PM   #5
chort
Senior Member
 
Registered: Jul 2003
Location: Silicon Valley, USA
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660

Rep: Reputation: 69
BTW ctl + a and ctl + e should work perfectly. I find them easier to use since I don't have to take my fingers off the home row.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Eterm Escreen mc problems HOME END keys etc. CMDR_PAIN Linux - Software 4 11-28-2005 12:15 PM
Home / End keys in aterm Vgui Linux - General 4 08-11-2005 12:59 PM
Home/End keys don't work Abdul Linux - Software 2 07-25-2005 08:48 PM
home, delete, end keys problem in vi bujecas Slackware 10 01-12-2005 02:32 PM
Home and End keys in RXVT kevmccor Slackware 3 12-16-2004 04:51 PM


All times are GMT -5. The time now is 05:59 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration