I have a couple of custom shortcuts defined using System preferences > Keyboard > Shortcuts and I want to sync those between my two Macs.
It seems, this is still not possible using iCloud. Are there any other ways? I thought about including them into my dotfiles, but can not find the shortcuts using the defaults
command.
Best Answer
Since you're using dot files, if you know what shortcuts you want to create ahead of time, you can add them to all machines by adding the following
defaults write
commands to your setup script:...where
com.developer.app
is the application's bundle ID, andkeyboardShortcut
is the letters of the keys you want to include, plus the symbols@
,$
,~
, and^
representing the Command, Shift, Alt, and Control keys, respectively. For example,-string "@~K"
would represent the keyboard shortcut ⌘⌥K.If you need to sync existing shortcuts, you're going to have to make a more complicated script. I imagine this would involve reading or comparing shortcuts on a source machine via:
...and writing them to a target machine via: