The goal: map "Caps Lock" to "Control" from the command-line.
I'm trying to update the modifier keys from the command-line with the following command as explained here and here but to no effect.
$ defaults -currentHost write -g "com.apple.keyboard.modifiermapping.1452-611-0" '(
{
HIDKeyboardModifierMappingDst = 2;
HIDKeyboardModifierMappingSrc = 0;
})'
When I do it from the "System preferences" it works right away and seem to be configured the same as when I do it the manually, as seen below:
$ defaults -currentHost read -g "com.apple.keyboard.modifiermapping.1452-611-0"
(
{
HIDKeyboardModifierMappingDst = 2;
HIDKeyboardModifierMappingSrc = 0;
}
)
This is the same exact result as when running it manually or from the GUI.
When restarting after running the command line, I see that in "System preferences" it's set correctly, like I expect but, it doesn't work. It only works when resetting do default and setting it manually.
I even tried copying the plist
file as suggested here again to no effect (even with restart).
Next I tried this with no success (ideas from here):
defaults -currentHost write -globalDomain <rest of command>
defaults write NSGlobalDomain <rest of command>
defaults write GlobalPreferences <rest of command>
Running OSX 10.9.4
(Mavrics).
Any ideas are welcome.