Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
是否有一种简单的方法可以确定是否单击了多键鼠标上的按钮(超过三个按钮)?
例如,五键鼠标上的第五个按钮。
我知道这是可能的,因为 USB Overdrive 和 Smart Scroll 等应用程序可以做到这一点……
是的,只要询问事件的buttonNumber:
buttonNumber
- (void)mouseDown:(NSEvent *)theEvent { if(theEvent.type == NSOtherMouseDown) { NSLog(@"Button number %ld was pressed.", theEvent.buttonNumber); } }