Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

multiple mouse buttons



Hi guys...

I'm trying to make my app differentiate between multiple mouse buttons held down at the same time.


My code basically goes like this (inside an NSView subclass):
-(void) handleMouseDown:(NSEvent *)e {
// here I need to determine which buttons were held down.
// problem is that [e buttonNumber] just gives me the index, not a bitmask.
}

-(void)mouseDown:(NSEvent *)e {
[self handleMouseDown:e];
}
- (void)rightMouseDown:(NSEvent *)e {
[self handleMouseDown:e];
}
- (void)otherMouseDown:(NSEvent *)e {
[self handleMouseDown:e];
}

Is there a maybe a Carbon function to get this info?
I've tried maintaining the flags myself, but when I'm in the middle of a drag it seems to ignore new buttons.

TIA,
Nicholas Francis
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.