On Thu, 24 Oct 2002, David A. De Graaf wrote: > The mis-behaviour of BS and DEL is one of my pet peeves with the > default setup of RH Linux. Each time I install I go thru an > elaborate editing session to "fix" it. > > Here are the notes I wrote to myself: > > > By default Linux uses the Backspace and Delete keys in a way that seems > unnatural and wrong to me. I strongly prefer the UNIX SysV method where > Backspace emits <^H> and Delete emits <^?>, and the stty functions, > 'erase' and 'quit' are associated with them. That allows the Delete > key to stop a running process, instead of <^C>. - easier to type. > The Backspace key works as expected everywhere - on the command line, > in various programs that require text entry, and in vi. And here I thought I was the only one who felt this way!! :-) Wish I really understood how all of those keycodes work. Has anyone ever found good documentation for the keytable stuff? > I also want to use vi-style editing on the command line. > > To fix the Backspace key and Delete key: > > ************ > /etc/rc.d/rc.local - append these lines to change BS & DEL > > # Fix Backspace and Delete keys > echo "rc.local: Restoring SysV functions to Backspace and Delete keys" > echo "keycode 14=BackSpace" | loadkeys > echo "keycode 111=Delete" | loadkeys Instead of using rc.local why not use the loadkeys program to initalize the keyboard at boot time? Something like the following works for me. Change KEYTABLE="us-local" in /etc/sysconfig/keyboard #cp /lib/kbd/keymaps/i386/qwerty/us.map.gz \ /lib/kbd/keymaps/i386/qwerty/us-local.gz # gunzip /lib/kbd/keymaps/i386/qwerty/us-local.gz # vi /lib/kbd/keymaps/i386/qwerty/us-local.gz and add the following at the bottom of the file: include "unix-console-delete-and-backspace" # gzip /lib/kbd/keymaps/i386/qwerty/us-local.gz Create a file # /lib/kbd/keymaps/i386/include/unix-console-delete-and-backspace.inc which contains the mappings for the del and backspace keys. # gzip /lib/kbd/keymaps/i386/include/unix-console-delete-and-backspace.inc IMHO this is a much cleaner solution and it survives upgrades very well. -- .............Tom "Nothing would please me more than being able to tdiehl@rogueind.com hire ten programmers and deluge the hobby market with good software." -- Bill Gates 1976 We are still waiting .... -- Psyche-list mailing list Psyche-list@redhat.com https://listman.redhat.com/mailman/listinfo/psyche-list