fabic974 random (binary) wanderings in the philament empires…

Xorg: quickfix keyboard layout with setxkbmap or localectl

Query current XKB keyboard states with :

$ setxkbmap -query

One-liner using setxkbmap :

$ setxkbmap -model tm2030USB \
            -layout us       \
            -variant ,altgr-intl,alt-intl        \
            -option "" -option grp:shifts_toggle \
            -verbose \
  && echo
  && setxkbmap -query

Note: the trailing , on the -variant ,alt-intl ... argument, means "" empty string => use the default variant for the specified layout.

‘tis better to use localectl nowadays, for it will update a conf. file located at /etc/X11/xorg.conf.d/00-keyboard.conf :

$ localectl set-x11-keymap us tm2030USB ,altgr-intl,alt-intl grp:shifts_toggle

List supported keyboard models, layouts, layout variants and options :

$ localectl list-x11-keymap-models
$ localectl list-x11-keymap-layouts
$ localectl list-x11-keymap-variants us
$ localectl list-x11-keymap-options

References :

EOF