keyboard problem

Brandon Peirce brandon_peirce at hotmail.com
Sat Oct 7 12:48:06 PDT 2006


Richard Caldwell wrote:
>How do you check your keyboard/locale configuration and change it? Next 
>time I reboot
>I'll try a differenet keyboard as a matter of interest.

You don't need to reboot to try out different keyboard mappings.
I'm not very familiar with the live CD, but I'm assuming it doesn't have X.
What I write hereafter applies only to the linux console.  X works
completely differently, using xmodmap.

Basically you just issue the loadkeys command.  Check out the man
page for all the options, but usually it should just work to enter a
command like
  loadkeys uk
to load a basic UK keyboard layout.  The actual keyboard map file
loaded by that command will be something like
/usr/share/kbd/keymaps/i386/qwerty/uk.map.gz
You can browse around that directory to see what other layouts
exist. There is also the concept of "partial maps", i.e. you load a
basic layout first and then load one or more map files that just remap
a few keys to obtain specific features of variant keyboard models,
or different behaviours e.g. "dead keys".

One thing to remember is that loadkeys changes the keyboard
layout on _all_ virtual consoles simultaneously.  As long as you
don't change the default, you can always recover by rebooting.
The default is normally loaded by a loadkeys command in one of
the bootscripts. I reckon it'll be pretty difficult to change that by
accident on a CD-ROM ;-)
but it becomes important once you've installed your real system.

Take a look at chapter 7.6 of the LFS book too (Configuring the
Linux Console).

Brandon





More information about the lfs-support mailing list