I have to following code to catch mouseDown
s on my custom NSView
but I think this only catches how many taps (using the clickCount
), not how many fingers were used to tap:
- (void)updateTrackingAreas{
if(trackingArea != nil) {
[self removeTrackingArea:trackingArea];
}
int opts = (NSTrackingMouseEnteredAndExited | NSTrackingActiveAlways);
trackingArea = [[NSTrackingArea alloc] initWithRect:[self bounds]
options:opts
owner:self
userInfo:nil];
[self addTrackingArea:trackingArea];
}
- (void)mouseDown:(NSEvent *)theEvent{
NSLog(@"%li",theEvent.clickCount);
if ([theEvent clickCount] == 3){
NSLog(@"3");
}else{
NSLog(@"normal");
}
}
Any ideas on how to catch 1 tap with 3 fingers on my custom NSView? I'd like to reproduce something like the Finder.app option, where you tap with 3 fingers on a file and a QuickLook panel shows up.
Thanks!