A Cleaner Way To Disable Caps-Lock
I figured out a much cleaner method for configuring the Caps-Lock key on my keyboard this morning.
In my earlier solutions I was using first setxkbmap to set the keyboard layout to dvorak and then I was calling xmodmap to configure the Caps-Lock key to behave like a third control key. However there were minor timing issues and portability issues with this method so I did some more searching for solutions.
The answer was right in front of my face as part of a tool I have been using ever since I switched to the dvorak layout. setxkbmap can take in a wide range of options for modifying the standard layouts. So by adding ‘-option ctrl:nocaps’ it just seems to do the correct thing for me.
At the same time I figured out one of the issues in my xmodmap script… So now that I don’t use it, it should work better… < grumble grumble >
Anyways, simpler is better. The less complexity in a system, the less there is to go wrong.