Re: Shift key state on mouse motion or drag etc..
Re: Shift key state on mouse motion or drag etc..
- Subject: Re: Shift key state on mouse motion or drag etc..
- From: Scott Harper <email@hidden>
- Date: Tue, 4 Oct 2005 02:22:55 -0600
How do you know if the shift key was pressed while the mouse was
being dragged?
I believe its in the flags that come with the NSEvent. but how
should you read the value and interpret it?
if ([theEvent modifierFlags] & NSShiftKeyMask)
{
// the shift key is down
}
I also have this functionality that I am seeking -- on my mouseDown
method in my custom NSView subclass, I have this code:
BOOL modPressed = [event modifierFlags] & NSShiftKeyMask;
NSLog(@"MouseDown -- Shift pressed: %i", modPressed);
This code, however yields the logged line...
2005-10-04 02:17:55.541 Marquer[4441] MouseDown -- Shift pressed: 0
...regardelss of whether or not I am actually PRESSING the shift
key. Any ideas?
--Scott
_______________________________________________
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