Sunday, May 21, 2017

Killing the CAPS LOCK key

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

Option "XkbOptions" "caps:none"
Option "XkbOptions" "shift:both_capslock"

At the command line:

$ setxkbmap -option "caps:none"

$ setxkbmap -option "shift:both_capslock"

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.


No comments: