• 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: Alternative startup for application
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Alternative startup for application


  • Subject: Re: Alternative startup for application
  • From: Michael Nickerson <email@hidden>
  • Date: Fri, 02 Apr 2010 23:13:57 -0400

On Apr 02, 2010, at 10:12 PM, Gideon King wrote:

> That's the instance method. New in 10.6 is the class method of the same name, which is what I need in this case, since I don't have an event to work with.
>
> On 03/04/2010, at 12:09 PM, Klaus Backert wrote:
>
>>
>> On 3 Apr 2010, at 01:15, Gideon King wrote:
>>
>>> Excellent, I like the new way of doing it using NSEvent directly, but I do need to support Leopard.
>>
>> - (NSUInteger)modifierFlags
>>
>> Available in Mac OS X v10.0 and later.
>>
>


You can use CGEventSourceKeyState( kCGEventSourceStateCombinedSessionState, 0x3A ).  That function will get the key down state at the time of the call, and 0x3A is the key code for the option key.


--------------------------------------
Darkshadow
(aka Michael Nickerson)
http://www.nightproductions.net


_______________________________________________

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

  • Follow-Ups:
    • Re: Alternative startup for application
      • From: Jean-Daniel Dupas <email@hidden>
References: 
 >Alternative startup for application (From: Gideon King <email@hidden>)
 >Re: Alternative startup for application (From: Jens Alfke <email@hidden>)
 >Re: Alternative startup for application (From: Quincey Morris <email@hidden>)
 >Re: Alternative startup for application (From: Gideon King <email@hidden>)
 >Re: Alternative startup for application (From: Klaus Backert <email@hidden>)
 >Re: Alternative startup for application (From: Gideon King <email@hidden>)

  • Prev by Date: Re: Terminating subtasks reliably
  • Next by Date: Why doesn't -[NSArrayController selection] et al fire keyPathsForValuesAffectingKey?
  • Previous by thread: Re: Alternative startup for application
  • Next by thread: Re: Alternative startup for application
  • Index(es):
    • Date
    • Thread