When "extending" my desktop across multiple monitors, how can I limit my mouse to one monitor when playing full-screen?
I have two monitors, and I often use the "extend" mode to work on both simultaneously as a large desktop. When playing games full-screen only one monitor is used, and that's fine.
However, I would like to use the other monitor to still work and display some other application windows. The problem is that with many games, moving the mouse to the edge of the primary monitor can cause it to move to the other monitor, and thus leave the game window. This is very troubling when using games where I need to move the mouse to the edge of the monitor in order to scroll the view. In these cases I am forced to disable the secondary monitor for the duration of my gameplay.
Is there any way to "trap" the mouse inside the game window, i.e. to prevent it from moving to another monitor as long as the game is in focus, so that only alt-tabbing away will allow the mouse to move there?
Solution 1:
Here are some more mouse-trap applications, like CSMMT which Shaun's answer mentioned, that trap your mouse cursor in one screen of a multi-monitor setup:
- MouseTrap
- MouseJail
- MurGeeMon (supports Lock Mouse Cursor On a Monitor)
- Script for AutoHotkey
I can't vouch for any of these, but you can try them out. You can also search for more with keywords "multi monitor trap mouse" or similar.
Solution 2:
Short answer:
- New games: Run in fullscreen mode.
- Old games: Use CSMMT.
Long Answer:
The best way to accomplish your goal in newer games is to run the game in fullscreen mode. This is a simple configuration option within the game and it will require no new software.
Take World of Warcraft (WoW), for example. Running it in fullscreen mode would be annoying to me. If I wanted to look something up, I would have to alt-tab to the desktop. That would get annoying, so instead I disable fullscreen mode (choosing windowed mode instead) and just make the window the size of the screen (which, in the case of WoW, is actually a third option: Windowed (maximized)). Same large-screen effect, but then I can mouse over to the second desktop to look things up. My FPS suffers slightly, but my video card is so beefy that it doesn't matter.
Now, take StarCraft 2 (SC2). Occasionally, I want to look something up. Much more importantly, though, I was to slam my cursor against the side of the screen so I start scrolling over to see events nearby. Having my mouse wander off onto my other desktop simply doesn't work out for me in this situation. So, I play SC2 in fullscreen mode and it's not an issue. My mouse is trapped and I don't have to worry about it wandering away.
Now, the above solutions only work for new games that have been made to be aware of multiple monitors. Older games did not know how to deal with situations where you went off the side of the screen and as a result. There are some pretty cheesy workarounds for this (unplug or disable the 2nd display while playing the game, orient your monitors at diagonals from each other). However, you might want to try CSMMT. It was made specifically to help trap your mouse for older programs where side-scrolling is a necessity.
Solution 3:
For Civ 5, this should have been fixed in the patch that was released at the end of October 2010. In my version of the game, there is a setting in the option to "Bind" the mouse to the game window {Never | Full-Screen Only | Always}.
Where did you purchase the game? If you purchased on Steam like I did, you should be automatically updated to the latest patch level unless you specifically disabled that feature. For other vendors, check with their support to see where you can download the updates.
Solution 4:
So let me get this straight...
The task is really simple: if you have a full-screen program open (essentially a game), lock the mouse to the main monitor. If the game is closed or minimized, unlock the mouse automatically.
At the time of writing, none of the free programs listed here do this, and the only program which claims that can do it costs $10.
So I wrote my own:
- Free and open-source
- Tiny, 8KB EXE
- No installation, no configuration, no dependencies - start and forget it!
- Activates when and only when it's needed, so should not get in your way
Source code: https://github.com/CyberShadow/AutoMouseLock
Compiled .exe: https://files.thecybershadow.net/AutoMouseLock/