【问题标题】:Does sandboxing allow my application to tap Quartz events?沙盒允许我的应用程序点击 Quartz 事件吗?
【发布时间】:2013-01-20 00:50:56
【问题描述】:

据this software作者:

TextExpander cannot be "sandboxed" according to the latest restrictions from Apple

TextExpander 的作用如下:

TextExpander saves your fingers and your keyboard, expanding custom keyboard shortcuts into frequently-used text

这到底是什么意思?我想对 Quartz 事件做出反应并相应地发布 Quartz 事件。

【问题讨论】:

  • 键盘快捷键和 Quartz 有什么共同点?
  • 作者所说的键盘快捷键其实是指完成快捷键扩展为预定义的sn-ps。
  • 但这与 Quartz 有什么关系?为什么还要提到它。
  • @trojanfoe 因为它是Quartz Event Services'事件点击机制,可以让应用在后台听键盘。
  • 啊,我明白了。这是有道理的。

标签: macos appstore-sandbox


【解决方案1】:

看起来不可能在沙盒应用中使用CGEventTap。这个Apple Developer Forum thread 显示了一些细节。

【讨论】:

  • CGEventTap 可以在沙盒应用中使用 - 但仅用于传递给应用本身的事件,而不用于传递给外部应用的事件。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2015-09-19
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2021-07-06
相关资源
最近更新 更多