views:

35

answers:

1

Hi,

I'm interested in capturing key presses while a NSMenu is open. For example, if the menu is open and the user presses "e", or "1" on the keyboard, send a particular message (preferably passing an event object which contains reference to which key was pressed).

I've looked into alternate menus, but I'm under the impression that can only be used to capture the option key.

Currently I'm not using any custom views, just NSStatusBar (where the menu spawns from) and NSMenu.

I'm new to Objective-C so my apologies if I'm wording anything incorrectly.

Really appreciate the help!

A: 

I assume you are searching for this: http://stackoverflow.com/questions/1657659/cocoa-nsstatusbar-global-hotkey

Gobra