I have an application that, upon activation, is ‘backgrounded’ and has an NSStatusItem icon which can be clicked to either close the application or open an NSWindow.
Currently, I can click the icon, and then press command+option+T and the NSWindow will activate but what I can’t do is press the key combo without first clicking the NSStatusItem.
So, I was wondering if it’s possible at all to register a hot-key in the system or where do I need to be looking so that I don’t have to first click the status item to ‘activate’ the application?
Thanks!
Yep! Implementing global hotkeys yourself is a bit tedious, but there are some really great wrappers out there. I’m quite partial to the one I wrote: http://github.com/davedelong/DDHotKey
You use it like this: