检测鼠标悬停在 Dock 上、任何 Dock 图标单击
有什么方法可以检测用户何时将鼠标悬停在扩展坞上的任何图标上?此外,有什么方法可以检测用户何时单击了扩展坞上的任何图标?
一定有一种方法可以检测到悬停,因为像 hyperdock 和 dockview 这样的 App Store 应用程序可以做到这一点。任何人都知道怎么做,如果你知道的话......你知道如何检测点击是否已完成吗?
谢谢!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为您可以使用辅助功能 API 以及类似 NSAccessibilityFocusedUIElementChangedNotification 查看何时将某些内容悬停在停靠栏上。不过我从来没有做过,所以我不能给你任何细节。对不起。
I think you can use the accesibility API's and something like NSAccessibilityFocusedUIElementChangedNotification to see when something is hovered over in the dock. I've never done it though, so I can't give you any details. Sorry.