NSButton + optionkey?
NSButton + optionkey?
- Subject: NSButton + optionkey?
- From: "Theodore H. Smith" <email@hidden>
- Date: Sat, 20 Aug 2005 13:52:34 +0100
How do I detect if the user is holding the optionkey down, while
clicking on an NSButton?
I tried this:
unsigned int f = [[NSApp currentEvent] modifierFlags];
BOOL optKeyDown = f & NSAlternateKeyMask;
return optKeyDown; //
that didn't work, though, it always returned false.
I tried this within a NSButton subclass:
- (void)mouseUp:(NSEvent*)theEvent {
unsigned int f = [theEvent modifierFlags];
BOOL optKeyDown = f & NSAlternateKeyMask;
...
}
But optKeyDown was always false, again.
How is this done then? Do I need to go outside of Cocoa and use
CarbonLib calls?
--
http://elfdata.com/plugin/
What does our work achieve, if it's not making the world a happier
place?
http://www.whatnextjournal.co.uk/Pages/Next/Happiness.html
When's the last time you thought deeply about how to improve our lives?
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden