How would I register a global hotkey in Objective-C/Cocoa (Mac) ?
For example, the hotkey I'd like to register would be Alt - Cmd - D
Any help would be appreciated!
There's a convenient Cocoa wrapper for the required Carbon functions on GitHub: JFHotkeyManager. You could also use the new (since 10.6) NSEvent API addGlobalMonitorForEventsMatchingMask:handler:
, but it only gets key events if access for assistive devices is enabled.