CursorLimiter
A program that limits the cursor to ONE screen on macOS.
macOS多屏幕环境中,限制鼠标在某一个屏幕。
使用方法
初始设定
-
编译
-
在安全性与隐私的辅助功能中添加终端.app
-
双击运行CursorLimiter
切换鼠标所在屏幕
-
按住Command键
-
将鼠标移动到其他屏幕
-
松开Command键
热键修改
屏幕切换热键在源码的const CGEventFlags SwitchKey
中定义为kCGEventFlagMaskCommand
,可按需修改。
如修改为const CGEventFlags SwitchKey = kCGEventFlagMaskCommand | kCGEventFlagMaskControl;
则表示使用Command + Control键进行切换。