Change keymap in Xorg without xorg.conf


The use of xorg.conf has become more and more deprecated with later versions of Xorg. Here is an alternative way to change keymap in Xorg without the use of the xorg.conf.

Open and edit the file:

/etc/X11/xorg.conf.d/10-evdev.conf

If it doesn't exist, create it.

If the directory xorg.conf.d doesn't exist below /etc/X11/, an alternative location might be:

/usr/share/X11/xorg.conf.d/10-evdev.conf

Add an InputClass that looks like this:

Section "InputClass"
        Identifier "evdev keyboard catchall"
        MatchIsKeyboard "on"
        MatchDevicePath "/dev/input/event*"
        Driver "evdev"
        Option "xkb_layout" "se"
EndSection

This example is for the swedish keymap. Change the "se" to your equivalent.


<< BACK