I never use Caps Lock, so I disable the Caps Lock key completely with xmodmap, to avoid hitting it by accident.
Occasionally my X server gets into caps-lock state anyway. (Usually some complicated stunt was involved, like attaching x11vnc to the display remotely.) And then I can't turn it off again using the Caps Lock key.
So I wrote a tiny X client that lets me type 'xcapslock off' at a shell prompt …
… and then I had to make an alias to it, called 'XCAPSLOCK OFF'.
@simontatham you don't really need the *lowercase* version of it, I guess! :)
Hm. Now wondering if you can bind capslock to "capslock off" for maximum "do what you want" :)
@jackv ha, true, I could have made "xcapslock" implicitly mean "on", and "XCAPSLOCK" mean "off"!
@simontatham Exactly! I'm sure that's a horrible mistake SOMEHOW but I can't think why :)
@jackv I think two reasons:
1. It assumes the _only_ use for the 'xcapslock' tool is to use it interactively on the command line. As soon as you find a use for the same tool in a script, you'll wish the syntax was more logical.
2. When you add the companion tool 'xnumlock', which has no analogous spelling variation in the command itself, you'll want both tools to have the same command-line syntax.