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.
我正在使用带有全局监控的 NSEvent 来监听鼠标滚动事件。但是,该事件仍照常传递给其他应用程序。我想取消该事件,以便只有我的应用程序可以解释该事件然后取消它,以便其他应用程序看不到滚动事件。最好的方法是什么?
据我所知,全局监视器仅用于监听事件。您必须使用较低级别的 CGEventTap C API 来实际捕获和修改(包括删除)流中的事件。