I\'ve been feverishly searching for a method by which to limit the user\'s mouse to one display in a multi-display setup on a Mac.
I\'ve stumbled upon this question
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