是否有一种简单的方法来找出是否单击多按钮鼠标上的按钮(有三个按钮)?
例如。五个按钮鼠标上的第五个按钮。
我知道这是可能的,因为诸如USB Overdrive和Smart Scroll之类的应用...
是的,只需要求活动的buttonNumber
:
- (void)mouseDown:(NSEvent *)theEvent
{
if(theEvent.type == NSOtherMouseDown)
{
NSLog(@"Button number %ld was pressed.", theEvent.buttonNumber);
}
}