From owner-freebsd-questions@FreeBSD.ORG Thu Sep 18 23:51:45 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8CEF6106564A for ; Thu, 18 Sep 2008 23:51:45 +0000 (UTC) (envelope-from lars@larseighner.com) Received: from mail.team1internet.com (mail.team1internet.com [216.110.13.10]) by mx1.freebsd.org (Postfix) with ESMTP id 54A178FC17 for ; Thu, 18 Sep 2008 23:51:45 +0000 (UTC) (envelope-from lars@larseighner.com) Received: by mail.team1internet.com (Postfix, from userid 12346) id B2CD516B66A; Thu, 18 Sep 2008 18:51:44 -0500 (CDT) Received: from larseighner.com (unknown [216.110.13.96]) by mail.team1internet.com (Postfix) with SMTP id 3E3E516B5F1; Thu, 18 Sep 2008 18:51:41 -0500 (CDT) Received: by larseighner.com (nbSMTP-1.00) for uid 1001 lars@larseighner.com; Thu, 18 Sep 2008 18:43:33 -0500 (CDT) Date: Thu, 18 Sep 2008 18:43:31 -0500 (CDT) From: Lars Eighner X-X-Sender: lars@debranded.6dollardialup.com To: manish jain In-Reply-To: <710047.2756.qm@web51305.mail.re2.yahoo.com> Message-ID: <20080918172333.A19245@qroenaqrq.6qbyyneqvnyhc.pbz> References: <710047.2756.qm@web51305.mail.re2.yahoo.com> MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="0-1070322530-1221781411=:19245" X-Sanitizer: Anomy and SpamAssassin mail filter - see http://www.6dollardialup.com/support/spaminfo.html X-Spam-Status: No, hits=-1.7 required=10.0 tests=EMAIL_ATTRIBUTION,FVGT_u_HAS_2LETTERFLDR,IN_REP_TO, J_CHICKENPOX_23,MIME_NULL_BLOCK,OACYS_SINGLE, QUOTED_EMAIL_TEXT,REFERENCES,SPAM_PHRASE_02_03, TO_BE_REMOVED_REPLY,TW_MD version=2.43 X-Spam-Level: Cc: freebsd Subject: Re: Problems on the console X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Sep 2008 23:51:45 -0000 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --0-1070322530-1221781411=:19245 Content-Type: TEXT/PLAIN; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE On Thu, 18 Sep 2008, manish jain wrote: > Hi, =A0 I am using FreeBSD 6.2 without X/Xorg. My shell is bash and my > keyboard layout is US-ISO. =A0 I am facing 2 problems on the console : = =A0 > 1) My backspace key works fine, but the Del and Delete keys also do a > backspace instead of a forward delete. How do I change this ? My > keyboard=A0is a basic 101/102 keyboard. This is the unix way. There are two strings which may be mapped to the keyboard Delete and Del (keypad . without num lock). In the default us.iso keymap the Del key (scan 083) is mapped to del, which is Ctrl-? The Delete (scan 103) is mapped to fkey61 --- this is also the string Ctrl-? --- not ^[[E which is the usual string for DOS type keyboards. As it happens ^[[E is fkey 54 which is keypad 5 without num lock. ^? is not the same as backspace (^H), but it seems to be the case that bash does the same thing with them. From=20what is below I cannot tell what TERM you are using or what keys you are trying to map to which function. If you are really using the console o= r a virtual TTY, the inputrc below is completely screwy. Mapping ^? to delete-char should get bash to do what you want. However, you can expect to have to make some adjustment to nearly every application, because looks like backspace sort-of is the unix way. Many applications do recognize the difference between backspace (^H) and (^?) but do a backwards delete (not the same as backspace) for ^?. Generally, since I can become root, I map Delete to fkey54 in syscons/keymaps/whateverkeymapyouuse. If you tweak the keymap yourself, besure to backup up your changes or change the keymap name to something not otherwise being used because the default keymaps will be reinstalled everytime you upgrade the system. Then I map ^[[E to forward-delete in applications, leaving Del as ^? in case this really does something desirable in the application. > 2) Bash simply does not remember > my commands in the right order. Most of the commands I type in a login > session are forgotten in the next session. Moving the Up and Down arrow > keys navigates a mangled and incomplete command history. =A0 I am attachi= ng > the contents of my .bash_profile, .bashrc and .inputrc below. > > =A0 > #.bash_profile : > if [ -f ~/.bashrc ]; then > =A0source ~/.bashrc > fi > #end-of-file > > =A0 > #.bashrc : > export HISTFILE=3D"~/.bash_history" This is the default > export HISTFILESIZE=3D1000 > shopt -s cmdhist > shopt -s histappend > #end-of-file > > =A0 > #.inputrc : > "\e[1~": beginning-of-line > "\e[4~": end-of-line > "\e[3~": delete-char=A0#should be a forward delete unless I am mistaken > "\eOd": backward-word=A0#ctrl-leftarrow > "\eOc": forward-word=A0#ctrl-rightarrow On a pc with an at keyboard with one of the default FBSD TERMs, none of these strings are sent. > set completion-query-items 20 > set meta-flag on > set input-meta on > set convert-meta off > set output-meta on > #end-of-file > > =A0 > If anyone can help me out, I shall be really grateful. > =A0 > Thanks in advance, > Manish Jain > goodredhat@yahoo.com > Unlimited freedom, unlimited storage. Get it now, on http://help.yah= oo.com/l/in/yahoo/mail/yahoomail/tools/tools-08.html/ > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.o= rg" > > --=20 Lars Eighner http://www.larseighner.com/index.html 8800 N IH35 APT 1191 AUSTIN TX 78753-5266 --0-1070322530-1221781411=:19245--