Configure your project as necessary the demo project is using ARC and sandboxed with no entitlements.
-
Import the Carbon.framework into your project if it's not already.
-
Link against the libPTHotKey-OSX.a
-
Include the needed resources from the lib so they are copied to your app. PTKeyCodes.plist AND PTKeyComboPanel.xib [ignore the xib, if you don't use PTKeyComboPanel but have your own UI. Or adapt the xib to your liking]
-
Use & enjoy
Also available via cocoapods
The lib's implementation came from Brett Terpstra's fork nvALT when searching for a dynamic global shortcut solution. Thank's for being awesome Brett.
the demo came from Keith Smiley (https://github.com/Keithbsmiley/PTHotKeyTest)