System Grab Bag

View all man pages from Ubuntu (or from all projects)

Name

keyboard - keyboard configuration file

Description

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 options XkbModel, XkbLayout, XkbVariant and XkbOptions. Unfortunately, there is little documentation how to use them. Description of all possible values for these options can be found in the file base.lst.

You might want to read \*(lqThe XKB Configuration Guide\*(rq by Kamil Toman and Ivan U. Pascal:

http://www.xfree86.org/current/XKB-Config.html

Other possible readings are:

https://wiki.archlinux.org/index.php/X_KeyBoard_extension http://pascal.tsu.ru/en/xkb/ http://www.charvolant.org/~doug/xkb/

The complete XKB-specification can be found on

http://xfree86.org/current/XKBproto.pdf

The file keyboard consists of variable settings in format:

VARIABLE = VALUE

Only one assignment is allowed per line. Comments (starting with '#') are also allowed.

Options

The following variables can be set.

XKBMODEL Specifies the keyboard model name. Default: pc105 on most platforms.

XKBLAYOUT Specifies the keyboard layout name. This is usually the country or language type of the keyboard. Default: us on most platforms

XKBVARIANT Specifies the keyboard variant components. These can be used to further specify the keyboard layout details. Default: not set.

XKBOPTIONS Specifies the keyboard option components. Options usually relate to the behavior of the special keys Default: not set.

BACKSPACE Determines the behavior of and keys on the console. Allowed values: "bs", " del " and " guess".In most cases you can specify guess here, in which case the current terminal settings and the kernel of your operating system will be used to determine the correct value. Value bs specifies VT100-conformant behavior: will generate ^H and will generate ^? Value del specifies VT220-conformant behavior: will generate ^? and will generate a special function sequence.

KMAP Usually this variable will be unset but if you don't want to use a layout on the console, you can specify an alternative keymap here. Specify a file that is suitable as input for loadkeys(1) on Linux or for kbdcontrol(1) on FreeBSD.

Files

The standard location of the keyboard file is /etc/default/keyboard. Description of all available keyboard models, layouts, variants and options is available in /usr/share/X11/xkb/rules/base.lst. In most cases, in /usr/share/keymaps/ " or " /usr/share/syscons/keymaps/ you will find several keymaps that can be used with the variable KMAP .

Notes

In Debian systems, changes in /etc/default/keyboard do not become immediately visible to X. You should either reboot the system, or use
udevadm trigger --subsystem-match=input --action=change

In order to activate the changes on the console, run setupcon(1) .

Bugs

When a triple-layout is used on the console, i.e. a layout with three groups, then the group toggling happens in the following way: Group1 -> Group2 -> Group1 -> Group3.

On FreeBSD triple- and quadruple-layouts are not supported on the console (only the first and the second layout are taken into account).

The option grp:shifts_toggle is not supported on the console.

Examples

The following configuration will give you the standard layout ( us ). The key will act as a compose key ( compose:menu ) and will act as third control key ( ctrl:nocaps ).
XKBLAYOUT=us
XKBVARIANT=
XKBOPTIONS=compose:menu,ctrl:nocaps

In the following configuration the right key ( grp:toggle ) will toggle between 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 Greek).
XKBLAYOUT=us,gr
XKBVARIANT=
XKBOPTIONS=grp:toggle,grp_led:scroll

In the following configuration the key combination will toggle ( grp:ctrl_shift_toggle ) between French keyboard ( fr ) without dead keys ( nodeadkeys ) and British ( gb ) \*(lqDvorak\*(rq ( dvorak ) keyboard. The right key will be a compose-key ( compose:rwin ) and the right key will function as AltGr ( lv3:lalt_switch ).
XKBLAYOUT=fr,gb
XKBVARIANT=nodeadkeys,dvorak
XKBOPTIONS=grp:ctrl_shift_toggle,compose:rwin,lv3:ralt_switch

See Also

  1. setupcon(1),
  2. ckbcomp(1),
  3. console-setup(5),
  4. loadkeys(1),
  5. kbdcontrol(1)