SystemWideKeyboardShortcut

last edited September 23, 2005 10:04:03 (70.97.145.14)
CocoaDev is sponsored by: Panic: Shockingly good Mac software!

I'm wondering how some of the OS X utilities out there (LaunchBar? or QuickSilver for instance) are able to "catch" keyboard shortcuts and perform a subsequent action (like make a window appear). In other words, how you create a system wide shortcut? I'm what you might call a "rusty" intermediate Cocoa programmer...much better at OOP than procedural C type programming...so if you could just point me in the right direction API-wide, I could probably figure it out unless it's really low-level stuff.

Basically, all I want to do is to be able to be notified when the user hits Command-Space or something similar. I know what to do from there. :)

Thanks,

JaredWhite


Look at my working sample code at http://www.egeronline.com/add/download/hotkey.sit


The keyword you're looking for is HotKeys. See also GlobalHotKeys and CarbonCompatibility.

Ah, thank you! I never thought of using that term, so that's why I couldn't find anything here. Awesome! -- JaredWhite