I need to catch the event of one finger right/left swipe for the Magic Mouse or two finger swipe for the Trackpad.
So far I've managed to set the event for two finger swipe on the magic mouse/ three finger on the trackpad, but this won't work in MAC OS X Lion because as of this version, this swipe is set to navigate through spaces.
[NSEvent addLocalMonitorForEventsMatchingMask:NSEventMaskSwipe handler:^(NSEvent *event) {
if ([event deltaX] == 1.0) { //LEFT SWIPE
[self backHistoryAction:nil];
} else if ([event deltaX] == -1.0) { //RIGHT SWIPE
[self forwardHistoryAction:nil];
}
return event;
}];
Thanks in advance.
Mikywan.