Capturing key events in a menu
Capturing key events in a menu
- Subject: Capturing key events in a menu
- From: Adam Warski <email@hidden>
- Date: Mon, 18 May 2009 16:31:40 +0200
Hello,
I'm quite new to Cocoa programming, and I've spent already some time
looking for a solution - maybe somebody here will be able to help.
Basically, I want to do quite a simple thing: capture a "keyDown"
event when a menu is opened. So the user opens a menu, presses a key
and I want to know what key it was.
Unfortunately NSMenu isn't an NSResponder, so I can't capture it
there. Also, the event isn't passed down to NSApp (where I could
capture it in a subclass or delegate), as the menu handles it to
position the higlight on the appropriate letter. Can I somehow
override that behaviour?
--
Thanks,
Adam Warski
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden