Keyboard configuration in console

From ArchWiki
Revision as of 07:50, 12 September 2013 by Lahwaacz (talk | contribs) (created the page)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Note: This article covers only basic configuration without modifying layouts, mapping extra keys etc. See Extra Keyboard Keys for these advanced topics.

Keyboard mappings (keymaps) for virtual console, console fonts and console maps are provided by the kbd package (it should already be installed), which also provides many low-level tools for managing virtual console.

High-level configuration can be done in /etc/vconsole.conf, which is read by systemd on start-up.

Viewing keyboard settings

You can use the following command to view keyboard configuration:

$ localectl status
   System Locale: LANG=en_GB.utf8
       VC Keymap: cz-qwertz
      X11 Layout: cz

Setting keyboard layout

The keymap files are stored in /usr/share/kbd/keymaps/ directory tree. You can use the following command to list all available keymaps:

$ localectl list-keymaps

Introduction and basic configuration

The virtual console (keyboard mapping, console font, and console map) is configured in /etc/vconsole.conf. It defines what keymap the keyboard is in the virtual consoles. Keytable files are provided by the kbd package. An example vconsole.conf is shown below:

Note: As of systemd-194, the built-in kernel font and the us keymap are used if KEYMAP and FONT are empty or not set.

Another way to set the keyboard mapping (keymap) is using localectl:

# localectl set-keymap de

See man 1 localectl and man 5 vconsole.conf for details.