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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to