The keyboard file describes the properties of the keyboard. It is read
by setupcon(1) in order to configure the keyboard on the console. In
Debian systems the default keyboard layout is described in
/etc/default/keyboard and it is shared between X and the console.
The specification of the keyboard layout in the keyboard file is based
on the XKB options XkbModel, XkbLayout, XkbVariant and XkbOptions.
Unfortunately, there is little documentation how to use them. Descrip-
tion of all possible values for these options can be found in the file
You might want to read "The XKB Configuration Guide" by Kamil Toman and
Ivan U. Pascal:
Other possible readings are:
The complete XKB-specification can be found on
The file keyboard consists of variable settings in POSIX format:
Only one assignment is allowed per line. Comments (starting with '#')
are also allowed.
The following variables can be set.
Specifies the XKB keyboard model name. Default: pc105 for most
Specifies the XKB keyboard layout name. This is usually the
country or language type of the keyboard. Default: us for most
Specifies the XKB keyboard variant components. These can be used
to further specify the keyboard layout details. Default: not
Specifies the XKB keyboard option components. Options usually
relate to the behavior of the special keys (<Shift>, <Control>,
<Alt>, <CapsLock>, etc.) Default: not set.
a XKB layout on the console, you can specify an alternative
keymap here. Specify a file that is suitable as input for load-
keys(1) on Linux or for kbdcontrol(1) on FreeBSD.
The standard location of the keyboard file is /etc/default/keyboard.
Description of all available keyboard models, layouts, variants and op-
tions is available in /usr/share/X11/xkb/rules/xorg.lst. In most cas-
es, in /usr/share/keymaps/ or /usr/share/syscons/keymaps/ you will find
several keymaps that can be used with the variable KMAP.
In Debian systems, changes in /etc/default/keyboard do not become imme-
diately visible to X. You should either reboot the system, or use
udevadm trigger --subsystem-match=input --action=change
When a triple-layout is used, i.e. a layout with three XKB groups, then
the group toggling happens in the following way: Group1 -> Group2 ->
Group1 -> Group3.
On FreeBSD triple- and quadruple-layouts are not supported (only the
first and the second layout are taken into account).
The option grp:shifts_toggle is not supported.
The following configuration will give you the standard US QWERTY layout
(us). The key <Menu> will act as a compose key (compose:menu) and
<CapsLock> will act as third control key (ctrl:nocaps).
In the following configuration the right <Alt> key (grp:toggle) will
toggle between US QWERTY layout (us) and Greek (gr) layout. The option
grp_led:scroll is ignored on the console but in X in means to use the
ScrollLock keyboard led as indicator for the current layout (US or
In the following configuration the <Control>+<Shift> key combination
will toggle (grp:ctrl_shift_toggle) between French keyboard (fr) with-
out dead keys (nodeadkeys) and British (gb) "Dvorak" (dvorak) keyboard.
The right <Win> key will be a compose-key (compose:rwin) and the right
<Alt> key will function as AltGr (lv3:lalt_switch).
Man Pages Copyright Respective Owners. Site Copyright (C) 1994 - 2019
All Rights Reserved.