Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

OSX keyboard shortcut background application, how to

I want my OSX application to sit in the background and wait for a keyboard shortcut to go into action. It should be configurable similar to Growl in the preferences, or accessible as dropbox in the statusbar.

  • What kind of xcode template do I have to use?
  • How do I capture keyboard shortcuts globally?
like image 239
Fabian Avatar asked Jan 09 '11 13:01

Fabian


1 Answers

Have a look at Dave DeLong's DDHotKey class on GitHub.

DDHotKey is an easy-to-use Cocoa class for registering an application to respond to system key events, or "hotkeys".

A global hotkey is a key combination that always executes a specific action, regardless of which app is frontmost. For example, the Mac OS X default hotkey of "command-space" shows the Spotlight search bar, even if Finder is not the frontmost application.

A generous licence as well.

like image 162
Abizern Avatar answered Sep 19 '22 18:09

Abizern