Zrb0529
Zrb0529

Reputation: 800

Assign a hotkey to NSWindow in Xcode/Interface Builder?

I have an application with an NSMenuItem that launches a separate window and I was wondering if it would also be possible to add a hot-key combination so that it would be possible to also invoke the NSWindow via that as well.

I was thinking that it's not possible, because wouldn't the application have to be 'Active' for a hot-key to work?

So, where should I be looking? Because, honestly, I'm not sure where to start.

Thanks!

Upvotes: 1

Views: 451

Answers (1)

WrightsCS
WrightsCS

Reputation: 50707

Edit: Try this Global Hotkeys

Your hot-key will only work when the app is active.

Click where the square is and press the combo of keys that you want to assign:

enter image description here

In case you mess up the combo of keys, you can clear it here (the "Clear" button at the bottom):

enter image description here

Upvotes: 2

Related Questions