In multiple monitor setup mouse often unintentionally leaves the screen e.g. when trying to click close, trying to click the scroll bar.

Is there any way (on Windows OS) to snap the mouse to the edge of the screen like snapping windows so that it only leaves the current screen when really required to?

  • I see you got an answer but didn't accept it. If that is because it's hard to move from screen to screen when they are only touching in the corners, you can use a dedicated app for that (for example Penteract Cursor Jumper).
    – User42
    Apr 25, 2022 at 17:04

7 Answers 7


Here is my solution for my dual monitor set up - I Arranged the virtual monitors diagonally like this:

enter image description here

  • When moving the mouse slowly the cursor will not leave the current screen.

  • Moving the mouse fast through the gap works fine.

  • This works in Windows 10, I don't know if older/newer versions of windows (will) have a restriction to this.

  • Perfect! I set little overlap so that I can move mouse to other display at bottom of edge. Dec 9, 2019 at 12:18
  • This is the answer, you don't need to install software to do this. +1
    – akaBase
    Oct 13, 2020 at 11:53
  • genius, i can't believe i didn't think of doing this
    – Askerman
    Apr 12, 2021 at 15:01
  • Absolutely great idea!
    – Bernd
    Apr 18, 2021 at 13:20
  • 2
    FYI: If you are using a drawing tablet that is a display screen, this is a horrible solution: as soon as you touch the tablet, your cursor will become locked on the tablet with no way of returning to the main screen.
    – FMaz008
    Dec 8, 2021 at 14:56

There is a program called Dual Monitor Tools that will allow you to do this. You can download the whole set of tools or just the DMT Cursor portion that will allow you to control cursor behavior.

This image shows the options you'll want to access to set whatever behavior you need. The sticky cursor option will help prevent accedental movement between screens. enter image description here

  • 1
    Combined with the previous this is working pretty well for me. Sometimes I need to press the hotkey to "Center cursor on primary screen" twice but that's fine. In Control Panel / Mouse Properties I also enabled "Show location of pointer when I press the CTRL key" option on the Pointer Options tab.
    – chx
    Sep 25, 2022 at 8:16

I made a program that addresses this: https://github.com/Eliasyoussef47/LockCursorInMonitor. You can find the latest version here

With this, holding the Ctrl key prevents the cursor from leaving the monitor it's currently on.

Screenshot of the program

Why I made this:

Windows has a feature where if you drag a window to an edge of the screen (right or left) and let go it will make that window cover the half of the screen. I use this feature often and I like that I can perform it very quickly and without moving my hands from where they normally are (right hand on the mouse and the left hand on the left side of the keyboard). The problem is if you have multiple monitors you have to move the window slowly to the edge that's between monitors for this feature to work, otherwise the cursor will pass over to the next screen.

That's why I wanted a solution that allows me to very quickly and temporarily restrict the cursor on the current monitor.

How this program is different from the other solution:

The main difference is that other programs always restrict the cursor until some user input (shortcut hotkey or holding a key/button), I wanted a program that only restrict the cursor at the user's command (the opposite).

This is different from the virtual monitors arrangement option (as Stubenraupe suggested) where:

  1. You have to change the arrangement of your virtual monitors, so you lose the freedom of the virtual monitors and it's a hacky solution.

This is different from Dual Monitor Tools (as BrainRenticus suggested) where your options are to:

  1. Restrict the cursor from crossing over until a specified resistance is applied.
  2. Completely restrict the cursor until this feature is disabled by a shortcut, after that you'd need to turn the restriction on again with a shortcut or press and hold a key/button to allow the cursor to move freely as long as that key/button is still pressed.

The first option wasn't good enough because it's hit or miss and if you move the cursor quickly you will overpower the resistance. I want to still be able to move freely between monitors and only restrict the cursor at certain and specific time so the second option is not what I'm looking for.

This program is different from Mouse Trapper (as Sairana suggested) where your options are (I wasn't able to download this program so I'm going off of the screenshot on the website):

  1. Always restrict the cursor except when a key is pressed.

This program is different from Cursor Lock (as Sairana suggested) where your options are:

  1. Limit the cursor to a program.
  2. Always restrict the cursor until a shortcut is pressed. (like option 2 in Dual Monitor Tools)
  • 1
    You should give more information and possibly screen shots. How does it differ from or surpass the utilities referenced earlier? Feb 27, 2021 at 3:21
  • 2
    @CharlesKenyon I added everything you asked for. I couldn't add a screenshot because my rep is too low. Feb 28, 2021 at 18:37
  • Nice program. Thanks for posting. I added the screenshot for you. Also, I upvoted your quality answer; hopefully you'll have enough rep in the future to post images. Nov 29, 2021 at 5:17

You can try the utilities like Mouse Trapper to restrict free mouse movement between the multiple monitors/screens and trap the mouse inside one display. You can still move the cursor over onto other screens by pressing a pre-selected key. Cursor Lock is another similar type of program that confines the mouse cursor to a selected area on the screen.


Having 3 Monitors with a notebook using Windows 10, and easily finding / controlling the mouse.

I'm using a HP Zbook 4 connected to a Thunderbolt 3. There are two additional monitors connected to the Thunderbolt. One 60" LG monitor - connected with HDMI cable / audio connected by RCA cable (red/white) 2 into 1 connector, and one Princeton monitor VL1916 / 19in / SXGA / 1280 x 1024 - connected with VGA cable (no audio cable connection).

After considerable effort getting that Thunderbolt docking station to be recognized by Windows 10 Pro and the HP notebook, getting the three separate monitors working was a simple task. And making the mouse so it doesn't get lost and is easily managed was also an easy task. Note: getting that docking station to work finally came together once a "Display Link" icon showed-up with the other taskbar icons.

Using the built-in Windows, Display Settings, the notebook's own monitor gets assigned as Monitor 1. The LG monitor assigned to Monitor 2, and the Princeton monitor assigned to Monitor 3. And of course, these monitors are setup to "Extend desktop to this display".

Inside the Display Settings window, the monitors get arranged with Monitor 1 on the left, and Monitors 2 & 3 (in that order) stacked next to Monitor 1 on the right.

Even though this does not capture or keep a mouse cursor within a single monitor, this does allow for keeping the mouse under predictable control and the mouse never gets lost.

This setting allows for moving the mouse across the notebook's screen (left to rightward) and then either moving upward to access Monitor 2, or moving across the notebook screen and then moving downward to access Monitor 3 screen. The mouse never needs shaking or moving around to find a lost mouse.

I've been using dual monitors for more than 20 years. This is the first chance using 3 monitors. And having 3 screens is absolutely a wonderful thing. I'll never go back to using dual monitors.

A screen print of the Windows, Display Settings, is shown below:

enter image description here


As @Stubenraupe suggested, moving displays diaognal in Display Settings fixes this issue. Just overlap a little if you want a path to move your cursor to next display. My second monitor has touchscreen so I don't need any mouse pointer there.

  • As it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center.
    – Community Bot
    Mar 10 at 20:59

I made a program which solves this problem. It constrains your mouse to the current screen. You can switch between screens using Alt+Q.


Free for 30 days and after that it costs approximately 5 dollars for a lifetime license.

This software also solves a major difficulty encountered when using a touchscreen and a mouse together. Please see the website for more information.

The program is ultra-lightweight and written in C++.

  • How? This is my first post and I have spent the last month developing a software which solves the precise problem in the original post. Oct 18, 2022 at 16:26
  • And since I am a 'serial spammer' - can you please let me know where is my other 'spam'? Perhaps other users might actually appreciate that I spent the time to develop a software that solves their problem and might appreciate hearing about it. Oct 18, 2022 at 16:27
  • Jiminy yes I posted there too because it also solves the problem mentioned in that post. So I have posted in TWO places - on two questions which my software offers a solution to. Actually a very useful solution which you will find is not available anywhere else online. So why exactly am I a serial spammer? Two posts = serial spammer? Oct 18, 2022 at 16:34
  • 3
    Please read the self-promotion part of this guideline. Oct 18, 2022 at 16:54
  • 2
    You conveniently don't mention that it's only free for 30 days.
    – DavidPostill
    Oct 18, 2022 at 16:59

You must log in to answer this question.

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