forked from matthewtodd/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 1
/
automate.txt
10 lines (8 loc) · 936 Bytes
/
automate.txt
1
2
3
4
5
6
7
8
9
10
# Map caps lock to ctrl
hidutil property --set '{"UserKeyMapping":[{"HIDKeyboardModifierMappingSrc":0x700000039,"HIDKeyboardModifierMappingDst":0x7000000E0}]}'
hidutil property --set '{"UserKeyMapping":[]}' # remove
/usr/libexec/PlistBuddy -c 'Delete com.apple.keyboard.modifiermapping.1452-636-0' ~/Library/Preferences/ByHost/.GlobalPreferences.*.plist
/usr/libexec/PlistBuddy -c 'Add com.apple.keyboard.modifiermapping.1452-636-0 array' ~/Library/Preferences/ByHost/.GlobalPreferences.*.plist
/usr/libexec/PlistBuddy -c 'Add com.apple.keyboard.modifiermapping.1452-636-0:0:HIDKeyboardModifierMappingSrc integer 30064771129' ~/Library/Preferences/ByHost/.GlobalPreferences.*.plist
/usr/libexec/PlistBuddy -c 'Add com.apple.keyboard.modifiermapping.1452-636-0:0:HIDKeyboardModifierMappingDst integer 30064771300' ~/Library/Preferences/ByHost/.GlobalPreferences.*.plist
plutil -p ~/Library/Preferences/ByHost/.GlobalPreferences.*.plist