If the key in question is one of the modifier keys, you may be able
to do something like this:
if (([[NSApp currentEvent] modifierFlags] & NSAlternateKeyMask) != 0)
{
// option-key down
}
Unfortunately it's not working. And I'd prefer not to use the old
event manager functions since I assume they are not supported under
64 bit.
Using [NSApp currentEvent] at launch won't work because there is no
current event at that point - you haven't started running the event
loop yet.
GetKeys actually is available in 64-bit HIToolbox, specifically
because there didn't appear to be any other way to do this, so I think
it's your best option for now.
-eric
_______________________________________________
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