New version of the console script

Alexander E. Patrakov see at the.sig
Sat May 1 21:21:13 PDT 2004

Anderson Lizardo wrote:
> On Saturday 01 May 2004 12:25, Alexander E. Patrakov wrote:
>>2) The kbd maintainers won't accept the fix, because each and every
>>distro has its own policy concerning Backspace and Delete (and Mandrake
>>even allows the user to configure that). And there are too many keymaps
>>to fix (approx. 50%), so I doubt that I am able to create this patch.
> Then begin sending the fix for your keymap. But from what I understand, "ru1" 
> fixes the problems found on "ru", right?

Yes, on LFS. But on distros that (as opposed to Linus Torvalds) think 
that Backspace should send Backspace, "ru" fixes problems with "ru1" 
(they configured Emacs differently).

>>If you don't like this loadkeys snippet to be hardcoded in the console
>>script, I can separate it into /etc/sysconfig/keymap_fixes and adjust
>>the wording in the book. Is this better?
> For me both are okay, but I think it would be better to have it commented out 
> by default to avoid surprises for non-qwerty users (It just affects the 
> backspace and delete keys, right?). A note on the book of course is 
> recomendable don't matter we choose to comment it out or not.

How about:

1) using the ability of the "loadkeys" program to load many keymaps at once
2) putting this backspace-delete fix into /etc/kbd/bs-sends-del instead 
of the console script
3) putting some other tweaks (yes, I have some) into other files in 
/etc/kbd (they should be a part of the bootscripts package)
4) adding the following text to the book (feel free to comment or reword):

The "console" script reads the configuration file 
/etc/sysconfig/console. If the file is not present, the script does nothing.

If the file is present, it should set the "KEYMAP" and "FONT" variables 
that are passed to "loadkeys" and "setfont" programs from the "kbd" 
package as arguments. If any of these variables is not set, the 
corresponding program is not being run at all.

If you need to pass more than one argument, use quotes. This is useful, 
e.g., if a chosen keymap almost suits you, but you want change some key 
definitions. Some common tweaks and fixes are provided by the 
"lfs-bootscripts" package in files under /etc/kbd. Their function is 
described in comments at the top of each file. WARNING: they may be 
incompatible with non-qwerty layouts.

For example, for Russians that like the "ru1" keymap but prefer to 
switch layouts by the Right Ctrl key (as opposed to Right Alt in the 
original "ru1" keymap) the following configuration file is correct:

KEYMAP="ru1 /etc/kbd/right-ctrl-switch"
FONT="cp866-8x16 -m koi2alt"

> BTW, I have problems with the delete key (not sure if backspace is affected) 
> on a default LFS installation, but it is fixed when I install /etc/inputrc 
> from BLFS. Is it similar to your problem?
> And my keymap (br-abnt2) includes the "linux-with-alt-and-altgr" keymap, have 
> you tried doing the same for those affected keymaps?

That's a different problem (in fact with bash and readline), and inputrc 
is the proper fix. The issue I am talking about does not affect your 
keymap since it contains the following lines:

keycode  14 = Delete
         control         keycode  14 = BackSpace

... and inherits the following from

keycode 111 = Remove

So my additional lines do nothing with your keymap.

BTW, if time presses, we can release the console script without this 
"backspace-delete" fix - adding /etc/profile and /etc/inputrc into the 
book has higher priority.

Alexander E. Patrakov
To get my address: echo '0!42!+/6 at 5-3.535.25' | tr [!-:] [a-z] | tr n .

More information about the lfs-dev mailing list