Skip to content

Instantly share code, notes, and snippets.

@ssp
Created December 11, 2009 12:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ssp/254172 to your computer and use it in GitHub Desktop.
Save ssp/254172 to your computer and use it in GitHub Desktop.
find keyboard equivalents in application preference files
#!/bin/sh
defaults find NSUserKeyEquivalents | grep Found | sed "s/.*domain .\(.*\).:.*/'\1'/g" | tr "\n" "," | sed "s/\(.*\),/(\1)/g" | sed "s/Apple Global Domain/NSGlobalDomain/g" | xargs -t -J appnames defaults write com.apple.universalaccess com.apple.custommenu.apps appnames
# If Mac OS X's keyboard preference pane forgot your custom keyboard equivalents, this may be able to restore them
# see http://earthlingsoft.net/ssp/blog/2009/07/keyboard_equivalents
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment