

Then specify a key (or key combination), which will be used for switching. To be able to easily switch keyboard layouts, first specify multiple layouts between which you want to switch (the first one is the default). Frequently used XKB options Switching between keyboard layouts Tip: localectl additionally writes the keyboard configuration to /etc/nf using variables XKBLAYOUT, XKBMODEL, XKBVARIANT and XKBOPTIONS, but the Xorg server does not read them from that file. # localectl -no-convert set-x11-keymap cz,us pc104 ,dvorak grp:win_space_toggle Unless the -no-convert option is passed, the specified keymap is also converted to the closest matching console keymap and applied to the console configuration in nf. To set a model, variant or options, all preceding fields need to be specified, but the preceding fields can be skipped by passing an empty string with "". It will save the configuration in /etc/X11//nf, this file should not be manually edited, because localectl will overwrite the changes on next start. Option "XkbOptions" "grp:win_space_toggle"įor convenience, the tool localectl may be used instead of manually editing X configuration files. This method creates system-wide configuration which is persistent across reboots.

The syntax of X configuration files is explained in Xorg#Configuration. Note: nf is parsed by the X server at start-up. See xkeyboard-config(7) for more detailed information. localectl list-x11-keymap-variants Įxamples in the following subsections will have the same effect, they will set pc104 model, cz as primary layout, us as secondary layout, dvorak variant for us layout and the Win+Space combination for switching between layouts.

Alternatively, you may use one of the following commands to see a list without a description:
Keyboard layout full#
To see a full list of keyboard models, layouts, variants and options, along with a short description, open /usr/share/X11/xkb/rules/base.lst. The layout name is usually a 2-letter country code. For example, to have the default us layout as primary and the dvorak variant of us layout as secondary, specify us,us as XkbLayout and ,dvorak as XkbVariant. If you want the default variant, specify an empty string as the variant (the comma must stay). Note: You must specify as many variants as the number of specified layouts. See the #Frequently used XKB options section for examples. Used for specifying layout switching, notification LED, compose mode etc.
