As a heavy Emacs user, I like to remap my Caps Lock key to function as the Ctrl key. There is a convenient dialog in the Keyboard Preference Pane to do that. But the problem is that this setting gets lost after someone logs into another account that hasn't this preference set.
So is there any way of doing the same as the preference pane dialog from the command line?
Best Answer
Changing preferences and running,
defaults -currentHost read -g
shows you what changes are being written. I was going to write up a short bash script to automate it, but it looks like I was beaten to the punch: