• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Getting modifierFlags during menu action
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Getting modifierFlags during menu action (From: Ron Fleckner <email@hidden>)

  • Prev by Date: Re: Request for help in getting table View to reflect fetch results
  • Next by Date: Re: Getting modifierFlags during menu action
  • Previous by thread: Getting modifierFlags during menu action
  • Next by thread: Re: Getting modifierFlags during menu action
  • Index(es):
    • Date
    • Thread