28

I have two screens on my Windows 10 machine, and find it cumbersome to change the mouse cursor from one screen to another. The only way I know is to drag the mouse cursor from one screen to another, but that requires travelling some distance and going through the unblocked corner.

Is there a shortcut that would allow my mouse cursor to jump from one screen to another?

8
  • 1
    Not natively, but there's software that can do it. Have you considered to increase the speed of your mouse, aka the sensitivity? I can do one swipe and move the cursor from the bottom left of my left monitor to the top right of my right monitor in a 3140x1200 desktop space. My hand moves about 10~15 cm on the mouse pad. By use of Mouse accelleration, I can move small distances by just moving the mouse slowly.
    – LPChip
    Commented Nov 13, 2018 at 10:10
  • Thanks @LPChip, increasing mouse speed helps, although there is still the barrier of passing through the right frontier corner. Commented Nov 13, 2018 at 10:14
  • 1
    Possible duplicate of Windows keyboard shortcut to move mouse cursor between two screens
    – Peter B
    Commented Nov 13, 2018 at 10:19
  • 1
    @ArnaudWeil for corners, you may want to reposition your monitors in windows, to eliminate one of the two corners. That way you can stop it from snapping on at least one of the two corners. You will likely want to change the actual height of your monitors to correct for the shift too, but I never found a situation where this did not solve my problems, because its often only the top corner that is the problem, not the bottom.
    – LPChip
    Commented Nov 13, 2018 at 10:58
  • 1
    Honestly, I actually have a program on my pc that allows me to do what you ask (its not free though) but I never use it because it takes much more time to move my hands to the keyboard to press the buttons, than it is to just push my mouse with some force to get the cursor precisely where I want it to go. Don't forget, after you move the mouse to the other cursor, it will still require you to move the cursor some more, so you must grab the mouse again.
    – LPChip
    Commented Nov 13, 2018 at 11:10

4 Answers 4

1

One solution to "move the mouse to the window that currently has keyboard focus" , which doesn't need any macro or hotkey software installed (and has existed since windows 1.0) is the the following key sequence:

[alt]+[space] 
[M]
[any arrow key] 

you can then move the mouse and the window will in be drag mode - press then release the left mouse button to exit drag mode.

this is a somewhat cumbersome solution, however if your really can't find the mouse, due to weird monitor placement, it will recover it for you.

1
  • Very close to what I need. However it won't work when the window is full size. In that case, first Alt+Space, Enter, then your keys. Anyway, this is the closest answer up to now, so I'll mark it as the answer. Thanks. Commented Dec 30, 2022 at 17:56
16

Many sources can be found for Windows 10 shortcuts. For example, Gizmodo's The Ultimate Guide to Windows 10 Keyboard Shortcuts that includes:

Windows Key+Shift+Left (or Right) — move a window to your next monitor.


If your problem is moving the mouse rather than a window, you need a tool such as AutoHotKey.

Here is a script (untested) that assumes your two monitors are of the same size, that uses Ctrl+Space for this:

^Space::
  CoordMode, Mouse, Screen ; mouse coordinates relative to the screen
  MouseGetPos, MouseX, MouseY
  if (MouseX > A_ScreenWidth) {
    MouseMove, -A_ScreenWidth, 0, 0, R
  } else {
    MouseMove, A_ScreenWidth, 0, 0, R
  }
return
3
  • 3
    Thanks for the link, but I can't see a shortcut for moving the cursor to another screen. Commented Nov 13, 2018 at 10:17
  • @harrymc You are the boss man !!
    – Mohit Shah
    Commented Aug 21, 2019 at 18:43
  • Thanks, I can't answer yet, so just commenting here, I decided to go with ; MOVE MOUSE TO SCREEN NUMBER (double backtick is escape char for backtick) :*:``1:: CoordMode, Mouse, Screen MouseMove, -1280, 1080 return :*:``2:: CoordMode, Mouse, Screen MouseMove, 1920, 1080 return :*:``3:: CoordMode, Mouse, Screen MouseMove, 5120, 1080 return
    – Albert
    Commented Mar 17, 2022 at 22:20
3

I modified Arnaud Weil's script to make it work with my setup. First time using AutoHotKey for me.

My #1 monitor has negative Y coordinates, while #2 has positive. So I'm checking MouseY instead of MouseX. I used the debugging feature in AutoHotKey in order to determine the coordinates near the middle of each screen, and simply hard-coded those into the script.

Here's what my monitor setup looks like: Multi-monitor arrangement with small intersection at corners

Here's the code. My "what" and "huh" variables were mainly to figure out which branch of the if was executing in the debug output. Whichever variable had a value, that was the branch I was in.

^Space::
  CoordMode, Mouse, Screen ; mouse coordinates relative to the screen
  MouseGetPos, MouseX, MouseY
  if (MouseY > 0) { ; Mouse is on monitor #2
    ;what = %A_ScreenWidth% 
    ;ListVars ; uncomment for debugging
    ;Pause ; uncomment for debugging
    MouseMove, -1071, -753, 0
  } else { ; Mouse is on monitor #1
    ;huh = %A_ScreenWidth%
    ;ListVars ; uncomment for debugging
    ;Pause ; uncomment for debugging
    MouseMove, 1286, 670, 0
  }
return

This could be improved to use a more general way of determining which screen the mouse is in, and to programatically determine the center coordinates for each screen. But this works for me.

EDIT: To new user adams, who messaged me in an answer below, I've suggested in comments to write a new question. (and please upvote if this helps you, or ask a new question)

He asks about what to do with 3 screens. In my code, I simply ask "am I on screen 1" and then, if yes, move the mouse to the middle of screen 2, else move it to the middle of screen 1. That won't work with 3 screens.

For him, the if section will probably look more like this:

  if (MouseY > 0 and MouseY <= 1920) { ; assuming Monitor 1 is 1920 pixels wide
    MouseMove, 2880, 540, 0 ; move to middle of Monitor 2, center screen
  } else if (MouseY > 1920 or MouseY <= 3840 ) { ; Mouse is on monitor #2
    MouseMove, 4800, 540, 0 ; move to middle of monitor 3
  } else { ; Mouse is on monitor #3
    MouseMove, 960, 540 ; move mouse to middle of monitor 1
  }

My code above assumes that your leftmost monitor starts at 0, 0. But, in my case, my left monitor has negative coordinates while my right has positive. You might have a similar situation. The debugging code I have in my first code snippet is what I used to determine the coordinates in my setup.

1

I felt the same and also I found quite frustrating that the cursor is not bounded to the sides of the display anymore. For example trying reach the "close window" button needs precise muscle control not to go over the edges. Whereas before you could simply crash again the top & right screen border and smash that window.

So I created a AutoHotKey script I refined overtime, today I'm pretty happy with the solution so I figured it could help some fellow Windows user:

  • Swiftly calculate the extend of both Display using a menu where you choose any Maximized window for each display.
  • Then on a press of a button it can determined on which display the cursor currently is and move it to the other one.
  • It saves the last position for each display and move it back to that position.
  • To avoid redoing the calibration every time it stores the display extends to %UserProfile%\display_shifter.ini
  • Highlight the arrival position of the cursor for easier spotting

More details and script file is available on the gist I created: https://gist.github.com/codekoriko/f9f2738afd253fe70c7ebc0843df3c91

note: updated the gist url

1
  • This is by far the best solution (Hidden Gem). I just needed to calibrate correctly by having two maximized windows in each display, and select them once. I like a lot the way it preserves the mouse position on each display and when I return back it returns to where my cursor was at on each display. I just change the keyboard shortcut to my preference (Alt+Space) and it's like magic. Thank you.
    – Omar
    Commented Aug 17, 2023 at 8:39

You must log in to answer this question.

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