From owner-freebsd-questions Fri Oct 25 15:31:18 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DF88A37B401 for ; Fri, 25 Oct 2002 15:31:16 -0700 (PDT) Received: from wally.christsgarden.org (memorris.redback.inficad.com [207.55.74.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0AFAB43E42 for ; Fri, 25 Oct 2002 15:31:16 -0700 (PDT) (envelope-from memorris@christsgarden.org) Received: from dilbert.christsgarden.org (dilbert.morris.home [192.168.77.2]) by wally.christsgarden.org (8.11.6/8.11.6) with ESMTP id g9PMd8B17186; Fri, 25 Oct 2002 15:39:08 -0700 Subject: Re: backspace and del keys From: Michael Morris Reply-To: memorris@christsgarden.org To: "Gary W. Swearingen" Cc: Giorgos Keramidas , freebsd-questions@FreeBSD.ORG In-Reply-To: References: <1035470680.2126.16.camel@dilbert.christsgarden.org> <002001c27b95$f7f705e0$f7808c96@LocalHost> <1035500526.273.33.camel@dilbert.christsgarden.org> <20021025020559.GA19906@hades.hell.gr> <1035558058.204.11.camel@dilbert.christsgarden.org> <20021025163633.GD673@hades.hell.gr> <1035564527.685.22.camel@dilbert.christsgarden.org> Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Mailer: Ximian Evolution 1.0.5 Date: 25 Oct 2002 15:20:33 -0700 Message-Id: <1035584433.205.33.camel@dilbert.christsgarden.org> Mime-Version: 1.0 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Figured it out for xterms. Readline(3) uses an initialization file .inputrc to customize commands. There was no inputrc file in the system si I added one in etc and set INPUTRC=/etc/inputrc in the /etc/bashrc file. I actually took the file from my Linux system but is has the following line. "\e[3~": delete-char This works fine in X but does not change the virtual consoles. That is not a problem because I rarely use them. The best thing about it is that I have learned quite a bit during this little exercise. You assistance is greatly appreciated. On Fri, 2002-10-25 at 15:18, Gary W. Swearingen wrote: > Michael Morris writes: > > > When I run tput kbs, nothing is displayed. > > When I run > echo "123$(tput kbs)456" > I get > 12456 > apparently because "tput kbs" puts out some kind of backspace to > the shell. Yes, tput kbs returns the Backspace key for that terminal definition in termcap. > > I suspect that you need to read your shell's discussions of command line > processing. Run "bind" (a shell built-in) and grep it's output for > "del" and "back". You should ensure that you've got your shell using > Emacs-style line editing. > > > Better yet, use the Control-D key for delete (the Emacs-style default) > and redefine the Delete keys for things you need less often. :-) > > Note that the key interpretation can be changed in an application (eg, > your shell), xterm X resources, termcap (?), your window manager config, > and in the X key config (in increasing precedence, I hope). > I will work with bind and learn more about it. It will come in handy later. > To take full advantage of your Internet/multimedia keyboard, you might > want to look into: > /usr/X11R6/lib/X11/xkb/ > /usr/X11R6/man/man1/*xkb* > http://www.tsu.ru/~pascal/en/xkb/ > Poor English, but sometimes better than official docs. > http://www.charvolant.org/~doug/xkb/ > "An Unreliable Guide to XKB Configuration" > Cool, thanks. I ran across some of those last night and made a note to revisit it later. Could be another useful bit of knowledge. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message