确定击键事件处理程序中的目标窗口
已经提出了几种击键通知的方法。在 10.6 中,通过 addGlobalMonitorForEventsMatachingMask 实现了全局事件监视器的想法。在早期版本中,有 Carbon 事件管理器和 GetEventMonitorTarget。还有 CoreGraphics 事件点击,如 CGEventTapCreate 中所示。
这些想法都来自 NSGod 在回答问题
在任何或所有这些技术中,是否可以在事件处理程序处确定哪个窗口是击键的目的地?
Several approaches to keystroke notification have been suggested. In 10.6, there's the idea of the global event monitor, by means of addGlobalMonitorForEventsMatachingMask. In earlier releases, there's the Carbon Event Manager, and GetEventMonitorTarget. And there's the CoreGraphics event tap, as in CGEventTapCreate.
These ideas all came from NSGod in the response to the question here.
In any or all of these techniques, is it possible to determine, at the point of the event handler, which window is the destination for the keystroke?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论