For some time, I have been interested in disabling the CAPS LOCK key. I frequently press it accidentally and it is a continuing aggravation. The old way of doing it no longer worked. I just set the task aside.
This will work.
Find the file in /etc/X11/xorg/conf.d that contains the "InputClass" section. Into that section, add
But that will not survive a reboot; the file edit above will or you can add it to rc.local.
Update: I have been unsuccessful using this in rc.local, so I created an entry in ~/.config/autostart that had both commands after EXEC= and that failed. It was not until I created two .desktop files, k1 and k2, that executed the commands in the proper order that it finally worked. SOURCES https://www.linux.com/learn/hacking-your-linux-keyboard-xkb