How to lock the mouse to one monitor in a multi-display setup. (On a Mac)

I've been looking for a way to lock the mouse to one monitor in a dual, or more, display setup.

[Edit:] The application that I am programming will be run in full-screen mode only, at all times. This means that it doesn't matter whether the mouse restriction is to the game window itself, or just on one monitor regardless of the applications being run. [ /Edit]

I'm programming in flash, and I know that until 11.2 comes out, it can't be done in flash, so I have to find some way to do it on the Mac OS itself, 3rd party software, or through hardware.

I'm looking for any and all suggestions on how to accomplish this by ANY means, or alternative solutions to Flash if it can't be done.

I've found 3rd party software on Windows 7 that allows me to do this, however I could not find one with Mac support.

Background info:

  • Using flash with Adobe AIR
  • Application going on a Mac Mini
  • Application is a game, one monitor shows the game, the other monitor has a separate application running
  • The two apps are connected through a localConnection object.
  • Using AS3

Question Summary:

How can I lock the mouse to one monitor in a multi-monitor display on OSX? Any and all suggestions are welcome.


enter image description here

do this in your preference the chance you get your mouse out of the current screen is low


I can't tell: are you attempting to package such a solution with your code, for every user of your software? Or are you looking for an app that YOU can use to achieve the desired functionality?

Here's a solution for the latter (Full Disclosure: I'm the developer!)

EdgeCase [Mac App Store]

enter image description here

Crossing Options (Toggle independently according to taste):

  • Bounce on screen edge
  • Wait 1/2 second
  • Hold [ctrl] or [⌘]
  • Cross when dragging

Advanced Options:

  • Inverse Hotkey: Bounding edges are only active when you hold the hotkey.
  • Main Screen Only: Cursor is only bounded when you're on the main screen with the menu bar.

EdgeCase [Mac App Store]


I'm going to answer my own question for now, since it seems to already be fading completely out of the spotlight.

Through all my research I've come to the conclusion there is not any way to do this cleanly and simply. I could very well be wrong, but after three days of looking I have yet to find an answer, so for now I will assume that there is not a currently existing 3rd party program to allow this on a Mac.

However, someone on stack overflow suggested that I program a basic application to run in the background to accomplish this goal using Cocoa, and so that is what I will be doing unless someone comes up with a faster/easier/cleaner solution and posts it here.

Here is that post from stack overflow:

https://stackoverflow.com/questions/8188193/limiting-mouse-to-one-display-on-mac-potentially-using-cocoa/8188310#8188310

I will be monitoring this just in case some one does answer it other than me.