views:

565

answers:

2

I'm trying to find a way to programatically get/set the default OSX system keyboard shortcuts (hotkeys) found in the System Preferences -> Keyboard & Mouse -> Keyboard Shortcuts tab. I need to be able to do this in the background, so GUI scripting is not a solution.

I'm unable to find a plist or anything where this info might be stored. I tried using Instruments "File Activity" trace while using System Preferences, but again came up empty handed.

Any help is appreciated.

A: 

Ooop, I re-ran Instruments, but made sure to close out System Preferences this time, the shortcuts weren't getting written out until then.

Turns out the file is located at ~/Library/Preferences/com.apple.symbolichotkeys.plist But it's pretty cryptic. None the less, this is what I was after.

A: 

There is an API for this (getting, not setting).

Nicholas Riley
Perfect, that's what I'm looking for as I really only want to get this information. It's always difficult tracking down an API that uses a completely different name from that in the UI (Symbolic Hotkeys vs System Shortcuts)...