gpt4 book ai didi

objective-c - 操作系统 X : Get mouse button position of button greater then the three standard buttons

转载 作者:行者123 更新时间:2023-12-03 17:56:13 27 4
gpt4 key购买 nike

是否有一种简单的方法可以确定多按钮鼠标(具有三个以上按钮)上的按钮是否被单击?

例如五键鼠标上的第五个按钮。

我知道这是可能的,因为 USB Overdrive 和 Smart Scroll 等应用程序可以做到这一点...

最佳答案

是的,只需询问事件的buttonNumber:

- (void)mouseDown:(NSEvent *)theEvent
{
if(theEvent.type == NSOtherMouseDown)
{
NSLog(@"Button number %ld was pressed.", theEvent.buttonNumber);
}
}

关于objective-c - 操作系统 X : Get mouse button position of button greater then the three standard buttons,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12966941/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com