

The -no-convert option can be used to prevent localectl from automatically changing the Xorg keymap to the nearest match. # localectl set-keymap -no-convert keymap It will change the KEYMAP variable in /etc/nf and also set the keymap for current session: For example:įor convenience, localectl may be used to set console keymap. If the variable is empty or not set, the us keymap is used as default value. The KEYMAP variable is used for specifying the keymap. It can be used very simply for this purpose:Ī persistent keymap can be set in /etc/nf, which is read by systemd on start-up. The loadkeys tool is used for this purpose, it is used internally by systemd when loading the keymap configured in /etc/nf. This is useful for testing different keymaps, solving problems etc. It is possible to set a keymap just for current session. $ find /usr/share/kbd/keymaps/ -type f -name "* search_term*" $ localectl list-keymaps | grep -i search_term
ENGLISH KEYBOARD LAYOUT CODE
To search for a keymap, use the following command, replacing search_term with the code for your language, country, or layout: dvorak for the Dvorak keyboard layout).įor a list of all the available keymaps, use the command: Keyboard layouts: where the layout is not related to a particular country or language (e.g.uk for United Kingdom English, or us for United States English) a list of country codes can also be found in wikipedia:ISO 3166-1#Officially assigned code elements. Country codes: where variations of the same language are used in different countries (e.g.Language codes: where the language code is the same as its country code (e.g.The naming conventions of console keymaps are somewhat arbitrary, but usually they are based on: Usually one keymap file corresponds to one keyboard layout (the include statement can be used to share common parts and a keymap file can contain multiple layouts with some key combination used for switching). The keymap files are stored in the /usr/share/kbd/keymaps/ directory tree. Use localectl status to view the current keyboard configurations. In addition, systemd also provides the localectl tool, which can control both the system locale and keyboard layout settings for both the console and Xorg. Keyboard mappings (keymaps), console fonts and console maps for the Linux console are provided by the kbd package (a dependency of systemd), which also provides many low-level tools for managing text console.
