Re: How get key down on launch?
Re: How get key down on launch?
- Subject: Re: How get key down on launch?
- From: Eric Schlegel <email@hidden>
- Date: Thu, 8 Nov 2007 21:33:23 -0800
On Nov 8, 2007, at 9:29 PM, Ken Drycksback wrote:
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
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden