Re: Getting modifierFlags during menu action
Re: Getting modifierFlags during menu action
- Subject: Re: Getting modifierFlags during menu action
- From: Wain Glaister <email@hidden>
- Date: Sun, 15 Jul 2007 10:12:16 +0100
Hi Ron,
IIRC you want to get the current event from NSApplication and then
get the modifier flags from the event.
unsigned int flags = [[[NSApplication sharedApplication]
currentEvent] modifierFlags];
Wain
On 15 Jul 2007, at 09:49, Ron Fleckner wrote:
Hi,
I'm making a class which adds a script menu to a Cocoa app. It
works well, but now I want to add functionality similar to other
script menus where if you hold down the Option key, the script will
open in the user's script editor rather than run itself. I can't
figure out how to get modifierFlags for the menu event/action.
I've looked in the archives, but no luck. Any pointers greatly
appreciated.
Ron
_______________________________________________
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