Keyboard layouts, variants and options

Keyboard layouts, variants and options

configuration > server > xorg-server > keyboard_layout_options_variants


The easiest way to control the keyboard layout is localectl, because that is the one-tool-for-all-solution.

localectl list-keymaps
localectl set-x11-keymap de_DE
localectl --help 

However if you haven't that installed or available on your OS, you can probably find the available keyboard layouts in the manual:

man xkeyboard-config


available layouts, variants and models can be found with

setxkbmap de               ;# short form
setxkbmap -variant intl us ;# with intl variant (more keys with right alt)
setxkbmap -layout de,us    ;# long form with two layouts


grep -E ^xkb_symbols < /usr/share/X11/xkb/symbols/us
setxkbmap us -variant intl
setxkbmap us -variant colemak
grep -E ^xkb_symbols < /usr/share/X11/xkb/symbols/de
setxkbmap de -variant neo


reset keyboard options (like caps:none or caps:swapescape)

setxkbmap -query      ;# displays options
setxkbmap -option ''  ;# removes options

man setxkbmap says: “If you want to replace all previously specified options, use the -option flag with an empty argument first.”

Autorepeat when holding keys

This makes backspace and the cursor keys more enjoyable and is called Typematic Rate Setting in some BIOS:

xset r off          ;# disable autorepeat
xset r on           ;# default setting
xset r rate 330 40  ;# explicitly set new rate and delay

Apply changes permanently

# /etc/X11/xorg.conf.d/10-keyboard.conf
Section "InputClass"
    Identifier "Keyboard Defaults"
    MatchIsKeyboard "yes"
    Option  "XkbLayout" "us"
    Option  "XkbVariant" "altgr-intl"
    Option  "AutoRepeat" "330 40"


Real terminal users need another toolchain.

loadkeys de

Configuration files

To make changes permanent (surviving a reboot):

/etc/locale.conf   # @see: man locale.conf
/etc/vconsole.conf # @see: man vconsole.conf