Skip to content

Instantly share code, notes, and snippets.

@sekimura
Created January 31, 2013 20:26
Show Gist options
  • Save sekimura/4686135 to your computer and use it in GitHub Desktop.
Save sekimura/4686135 to your computer and use it in GitHub Desktop.
swapping Ctrl-Caps keys from terminal
#!/bin/bash
key="com.apple.keyboard.modifiermapping"
defaults -currentHost delete -g $key
defaults -currentHost write -g $key '(
{
HIDKeyboardModifierMappingDst = 2;
HIDKeyboardModifierMappingSrc = 0;
},
{
HIDKeyboardModifierMappingDst = 0;
HIDKeyboardModifierMappingSrc = 2;
},
{
HIDKeyboardModifierMappingDst = 0;
HIDKeyboardModifierMappingSrc = 10;
}
)'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment