How to prevent/change system-wide Keyboard / Mouse events under Mac OS X?

后端 未结 1 857
死守一世寂寞
死守一世寂寞 2021-01-28 09:53

I find two method to handle global events on Mac OS:

  1. NSEvent.addGlobalMonitorForEvents only get a copy of origin event, can monitor, but not change or prevent.
相关标签:
1条回答
  • 2021-01-28 10:32

    You can use Quartz Event Taps for that. In order to monitor/change/block keyboard events, your process will need to be trusted for Accessibility access.

    0 讨论(0)
提交回复
热议问题