I am following this1 tutorial about remapping keys in Ubuntu. The tutorial describes how one can remap the CapsLock key using
setxkbmap. Currently I only want to test this by disabling the Caps Lock key:
setxkbmap -option "caps:none"
which works fine. However, it does not store the change permanently. After rebooting, the change is lost. The tutorial recommends to use a file
/usr/share/X11/xorg.conf.d/10-keyboard.conf and enter a
Section "InputClass" Identifier "system-keyboard" MatchIsKeyboard "on" Option "XkbLayout" "no,us" Option "XkbModel" "pc105" Option "XkbOptions" "caps:none" EndSection
However, on my Ubuntu 16.04 machine there is no file
After further googling, I got more confused, as there seems to be wide variety of answers and corresponding recommended files to use. For example, these file have been mentioned
What is the correct way to do this on Ubuntu 16.04?
Creating a new file
/usr/share/X11/xorg.conf.d/10-keyboard.conf as suggested by @GunnarHjalmarsson in a comment, does not work either. However, I tested now setting the option in
XKBMODEL="pc105" XKBLAYOUT="no" XKBVARIANT="" XKBOPTIONS="caps:none"
and this seems to work fine! It would be nice if someone could also explain why?