Keyboard

The "keymap" of the text console is a single name that is stored in /etc/keymap. At every boot, /etc/rc runs loadkeys with that name and discards it's output:

[ -f /etc/keymap ] && loadkeys "$(cat /etc/keymap)" > /dev/null 2>&1

A new stage has no /etc/keymap, and the console then uses the kernel default, which is US. The tools are provided by the kbd package (loadkeys, dumpkeys, showkey, setfont and others).

Find a map

The maps are located in /rod/profile/share/keymaps. A name is the name of a file in a subdirectory of i386, without the ending .map.gz. The installer lists the names with:

$ find /rod/profile/share/keymaps/i386 -name '*.map.gz' | sed 's|.*/||; s|\.map\.gz$||' | sort -u

On the 0.1.0 image this lists 202 names, among them us, uk, de, de-latin1, fr, fi, es, it, no, pl, ru, sv-latin1, dvorak and colemak. The subdirectories are azerty, bepo, carpalx, colemak, dvorak, fgGIod, hcesar, include, neo, olpc, qwerty and qwertz. Maps for other platforms are located in amiga, atari, mac, pine, ppc and sun.

Change the map

# loadkeys fi
# echo fi > /etc/keymap

The first command changes the layout of the virtual consoles immediately, and the second command makes the change permanent. A name that does not exist is rejected. At boot the error is discarded, so a wrong name in /etc/keymap leaves the US layout in effect and produces no message.

setup --keymap

setup --keymap NAME accepts only letters, digits, - and _ (any other name is refused). It writes the name to /etc/keymap, runs loadkeys. It does not check the result of loadkeys, so setup --keymap nosuchmap leaves that name in the file. You should therefore run loadkeys NAME first.

Where the map does not apply

The installer lets you choose a map, loads it at once and passes the choice to setup --keymap. In the live system, you must run loadkeys before you type a password; see manual install.