检测鼠标悬停在 Dock 上、任何 Dock 图标单击

发布于 2024-12-20 02:02:18 字数 192 浏览 4 评论 0 原文

有什么方法可以检测用户何时将鼠标悬停在扩展坞上的任何图标上?此外,有什么方法可以检测用户何时单击了扩展坞上的任何图标?

一定有一种方法可以检测到悬停,因为像 hyperdock 和 dockview 这样的 App Store 应用程序可以做到这一点。任何人都知道怎么做,如果你知道的话......你知道如何检测点击是否已完成吗?

谢谢!

Is there any way of detecting when a user has moused over ANY icon on the dock? Furthermore, is there any way of detecting when a user has clicked ANY icon on the dock?

There must be a way that hover is detected, since App Store apps like hyperdock and dockview do it. Anyone know how, and if you do...do you know how to detect if a click has been done?

Thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

滥情稳全场 2024-12-27 02:02:18

我认为您可以使用辅助功能 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文