Keyboard shortcut for moving a window to another screen
Solution 1
Autohotkey! This'll move between the monitors (two 1680x1050 monitors, set the value after Loop,
to be each monitor's screen resolution/10 if you're different) on winkey (#) and q.
Control is ^, alt is !, shift is +, and letters are letters. You can use combinations of the modifiers, too.
#z:: ;Move the active window to the other monitor.
WinGetPos, winx, winy,,, A
WinGet, oldWin,ID,A
WinActivate, A
WinGet, mm, MinMax, A
WinRestore, A
If winx+5 >= 0 then
mult=1
else
mult=-1
WinMove,A,, winx-(1680*mult), winy
if mm=1
WinMaximize, A
Return
Solution 2
What version of Windows are you using? Windows 7 comes with native support for exactly this.
Win+Shift+left: Move focussed window one monitor to the left
Win+Shift+right: Move focussed window one monitor to the right
EDIT: For XP you could try out UltraMon. Amongst other things it will allow you to define hotkeys for "Move window to next monitor" and "Move window to previous Monitor".
Solution 3
in other versions of windows, you can right click on the taskbar, select "move" and then use the arrow keys to move the window across to the correct window... I only mention this because every now and then, I accidentally leave a window on the wrong monitor and then when I use my laptop at home, I can't see the window because it's off monitor. Took me a while to figure this out!
Solution 4
If you don't have Windows 7, you may want to try DisplayFusion. The free version allows you to configure hotkeys to move windows to the next monitor, and several other goodies.
Related videos on Youtube
Comments
-
BruceBerry over 1 year
When working with two (or more screens), a common problem is that launched applications appear on the "wrong" screen. I especially find this annoying when launching a text editor from the command line, because I have to leave the home row with my right hand in order to drag the window to the "right" screen before I can continue typing.
Is it possible to define a keyboard shortcut which moves the current application to the other/next screen?
Edit: I'm using Windows XP, but it's good to know that the feature already exists in Windows 7.
Edit2: I went for the autohotkey script. This adaptation works for me:#q:: WinGetPos, winx, winy,,, A WinGet, mm, MinMax, A WinRestore, A If (winx > 1270) { newx := winx-1270 OutputDebug, Moving left from %winx% to %newx% } else { newx := winx+1270 OutputDebug, Moving right from %winx% to %newx% } WinMove, A,, newx, winy if mm=1 WinMaximize, A Return
I did have to make use of the OutputDebug statements and dbgview to discover the proper threshold value
1270
for moving left or right. The exact threshold is especially important when moving maximized windows to the left. -
Ivo Flipse over 14 yearsI feel like a newb for not knowing that +1
-
sYnfo over 14 yearsOff topic, but how did you make those "buttons"?
-
Ville M over 14 years@sYnfo wrap the "button" in a <kbd></kbd> tag
-
Pauk over 14 years+1, thanks for that. I was using Ultramon previously, no longer need it with this.
-
UNK over 14 yearsUltramon is expensive, but IMO well worth the price.
-
BruceBerry over 14 yearsThis is promising, but the loop is really slow. The window crawled over my desktop at a snail's pace :-)
-
BruceBerry over 14 yearsThe script also moves the window under the mouse pointer, instead of the currently active one.
-
UNK over 14 yearsWhoops! I have it on mouse 4 and double click, so under mouse is better for me, and the crawling thing is because XP was slow at redrawing windows. It's fine on Vista and above. One moment, please :)
-
UNK over 14 yearsRight, edited the script there, try that :)
-
Bless Yahu almost 12 yearsTHIS should have been picked as the answer. Glad I found this.
-
Tim Partridge over 11 yearsThis behaviour is only true for my right windows key and not my left windows key. The choice of my left or right shift key is irrelevant. Can anyone else confirm this behaviour? If I use my left windows key then the window resizes instead of moving to the other monitor.
-
Roland Pihlakas almost 11 yearsThough under Windows7 You cannot move from the taskbar menu, You still can move the windows using shortcut keys: Ctrl+Space and then M, arrow keys, finally Enter. en.wikipedia.org/wiki/…
-
Amit Naidu over 6 yearsCorrection: In Windows 7, you can move from the taskbar - Use
Shift + Right Click