[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: fixing backspace and delete

anne@ibbnet.nl wrote:
> On 22 Apr, Petr Kolar wrote:
> >> system keymap, setting keycode 14 to backspace and keycode 111 to
> >> delete.
> > 
> >    Is not better to map keycode 14 to delete and keycode 111 to remove (and
> > later to "\e[3~") and let Ctrl-H to be backspace? Does eg. 'info' work with 
> > your setting?
> > 

   In principle both these mappings are possible. The former was
described in Linux Journal from June 1997 (pages 52-63), the latter
in ftp://ftp.linux.org.uk/pub/linux/docs/HOWTO/mini/Key-Setup .

   The latter has the advantage that it is possible to distinguish
the key Ctrl-H (help in some applications) and the key Backspace
('delete a char left from the cursor' or 'page up'). Linux kernel
use it by default (see /usr/src/linux/drivers/char/defkeymap.map).
And also it looks better to have something like

bindkey "\e[1~" beginning-of-the-line  # Home
bindkey "\e[2~" overwrite-mode         # Insert
bindkey "\e[3~" delete-char            # Delete
bindkey "\e[4~" end-of-line            # End

in /etc/csh.cshrc (and something similar in other configuration
files) than when among these lines would appear

bindkey "^?"    delete-char            # Delete

> In info both the backspace and delete key will erase to the left
> (backspace). Since the arrow keys do not seem to work in
> info (and many other apps) delete can't be used anyway (sad but true). I
> have not yet found problems with the remap-method, the backspace-key
> always works (deletes to the left). The delete-key mostly works as well,
> although in e.g. rm, mv (mmm... all the GNU apps), ftp it generates ^?.
> I have never been able to get those apps to do both right, with or
> without remapping (ncftp is much nicer anyway...). BTW, in these apps
> the cursor keys don't work either.

   I think the Backspace key should work in all applications; and Delete,
Home, End etc. keys in every application which want to use them. And it
is terrible that it is not already so with most distributions of Linux. 

'ncftp is much nicer than ftp' is no argument.

>     If you map keycode 14 to delete, I think the delete button will 
> generate ^H.

   NO! If you map keycode 14 to delete, the Backspace button (on a PC 
keyboard; keycode 14) will generate ^?.

>                 This way the delete key will probably always do a
> backspace. I have briefly tried configuring the keys without remapping,
> however, I couldn't get pine and pico right without breaking others
> (e.g. joe). The good thing of the remapping is that it makes the
> mapping consistent between the console and X.

xmodmap -e 'keycode 22 = BackSpace'

is enough for X. And I am sure most application would not have any problems
with this mapping.

                                                      With regards
                         ***  Petr Kolar  ***
Department of Information Technologies, Technical University of Liberec
            Voronezska 1329, 461 17 Liberec, Czech Republic
            Phone: +420-48-535-2371   Fax: +420-48-535-2229
  E-mail: Petr.Kolar@vslib.cz   http://www.cesnet.cz/staff/kolar.html

To UNSUBSCRIBE, email to debian-i18n-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Reply to: