Limiting mouse to one display on Mac (Potentially using Cocoa)

我是研究僧i 提交于 2019-11-30 14:57:26

Use a Quartz Event Tap to filter mouse moved and mouse dragged events. In the tap callback, use CGEventSetLocation to modify the location of mouse events that would otherwise move off the main screen.

You may need to run the program as root, or have assistive device access enabled in System Preferences.

Quartz Event Services Reference

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!