Re: Alternative startup for application
Re: Alternative startup for application
- Subject: Re: Alternative startup for application
- From: Jean-Daniel Dupas <email@hidden>
- Date: Tue, 6 Apr 2010 09:14:17 +0200
Le 3 avr. 2010 à 05:13, Michael Nickerson a écrit :
>
> 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.
>
>
altDown = (kCGEventFlagMaskAlternate == (CGEventSourceFlagsState(kCGEventSourceStateCombinedSessionState) & NSDeviceIndependentModifierFlagsMask));
_______________________________________________
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