Gentoo Archives: gentoo-dev

From: Pete Gavin <pete@g.o>
To: gentoo-dev@g.o
Subject: Re: [gentoo-dev] Keyboard -- DEL Key
Date: Tue, 06 Feb 2001 01:19:48
Message-Id: 20010206011948.A24074@cvs.gentoo.org
In Reply to: Re: [gentoo-dev] Keyboard -- DEL Key by 320095285153-0001@t-online.de (Achim Gottinger)
1 On Tue, Feb 06, 2001 at 07:50:31AM +0100, Achim Gottinger wrote:
2 > Knut Feiert wrote:
3 >
4 > > On Mon, 5 Feb 2001 11:49:54 -0700, Pete Gavin wrote:
5 > >
6 > > >
7 > > >Add this line to your ~/.inputrc file to make the delete key work as
8 > > >expected in bash:
9 > > >
10 > > >"\e[3~": delete-char
11 > >
12 > > Why is that? Oversight or feature?
13 >
14 > A point on my Todo list. Pete do you know which of the console-tools
15 > files is the best place to start patching?
16 >
17 > achim~
18 >
19
20 This isn't anything that needs to be patched. Its actually a
21 feature. Whenever you hit the delete key, it sends the sequence
22 "\e[3~" (\e==^[), which the program can translate as it wishes. (The
23 same sort of thing happens with the insert key, home and end, and page
24 up/down.) The .inputrc file allows you to bind whatever keys to
25 whatever functions you want. The bash developers just decided not to
26 automatically bind delete to any function. If you want to make this
27 automatic, you could add a .inputrc file containing that line to
28 /etc/skel, so that every new user automatically has it in his/her home
29 directory after its been created. Or, you could add this line to
30 /etc/profile:
31
32 bind '"\e[3~": delete-char'
33
34 If you want more information on this stuff, do info bash and do a
35 search on inputrc by hitting Ctrl-s.
36
37 Pete

Replies

Subject Author
Re: [gentoo-dev] Keyboard -- DEL Key 320095285153-0001@t-online.de (Achim Gottinger)