How can I query OS X to know if an application has registered a shortcut?

I could inspect every app I have or that is running at least with KeyCue and go through the Keyboard Shortcuts section of System Preferences, but there must be some other method using the shell.

  • I think it depends on which version of osx you are using. I am going to post osx 1.8.5 and once you specify which version of osx you are running I can update the answer. – Deesbek Oct 14 '13 at 19:26
  • I think you should also change the title of your question to mention it is keyboard shortcuts you are asking about, when I came across your question I thought you were talking about file shortcuts or ln's. – Deesbek Oct 14 '13 at 19:28
/usr/libexec/PlistBuddy -c "Print" ~/Library/Preferences/com.apple.symbolichotkeys.plist

Will do it for you. Then you can edit the individual keys from there.

The details are extracted from: http://reviews.cnet.com/8301-13727_7-57337941-263/tackling-keyboard-shortcut-woes-in-os-x/

You can modify the above file as per: http://support.apple.com/kb/HT4850

However note the file is binary and you cannot use a text editor, you have to use the command defaults, or the command PlistBuddy. defaults can be used if you know the individual keys you want to modify. PlistBuddy is more user friendly.

  • 1
    Thanks for the plist reference. This way I found some useful documentation about the plist self, hintsforums.macworld.com/showthread.php?t=114785. – 1.61803 Oct 18 '13 at 0:15
  • If that is the answer to your question, you should put it in answer format and tick it as self answer. NP by the way. – Deesbek Oct 18 '13 at 0:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .