7

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.

3
  • 1
    Would it suit you to keep the mouse inside the full-screen game's window, or must the cursor be confined to the one monitor regardless of the monitor's contents? The two scenarios probably have different solutions.
    – Dan J
    Commented Nov 18, 2011 at 19:10
  • Either situation provides a viable solution, as the sole purpose of the machine this will be running on is to display this application (in full-screen only).
    – JonathonG
    Commented Nov 18, 2011 at 19:14
  • Any easy but cheaper suggestions besides EdgeCase?
    – teemue
    Commented May 13, 2014 at 19:39

5 Answers 5

8

enter image description here

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

1
  • I have it like this but it still escapes sometimes and is super confusing / annoying. Shame on Apple that doesn't have a setting for this obvious issue. "Limit cursor to one display"
    – doctorram
    Commented May 20 at 19:19
4

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]

1
  • Does this still work? It's a hefty investment just to find out if it's broken. I'd totally buy it if it works though. Commented Oct 27, 2016 at 18:34
3

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.

1
  • did you ever finish the app?
    – Dobler
    Commented Sep 13, 2022 at 1:14
1

(Disclosure: I'm the developer)

I've also written app that confines the pointer to a single screen, I daily drive it daily with my multi-monitor setup. It comes up with cli program in the app bundle that you can use to confine cursor to any screen or even any region programmatically. (Make sure you have way to terminate the cli program if doing the latter though)

https://apps.apple.com/us/app/mouselocker/id6450712305

0

Found a solution that works perfectly! Make the other monitor to mirror the main display, but change the input source of that monitor to HDMI2 or something that you don't use. The problem solved without any need to installing any extra software, Voila!

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .