Is there a simple way to detect that the option key was down when a button was clicked? I have a method in my controller that gets the button click, of course, and I have been trying this:

-(IBAction) handleButton:(id)sender {

        if( [[NSApp currentEvent] modifierFlags] && NSAlternateKeyMask ) {
                // handle option + click
        }
        else {
                // do normal stuff
        }
}

but of course the currentEvent is not necessarily related to the sender. In fact, I realize there is no reason to think that there should be any information about the keyboard status in the sender parameter.




_______________________________________________

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 [EMAIL PROTECTED]

Reply via email to