Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

share|improve this question
add comment

5 Answers 5

up vote 4 down vote accepted

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
share|improve this answer
1  
This is promising, but the loop is really slow. The window crawled over my desktop at a snail's pace :-) –  wcoenen Oct 29 '09 at 15:59
    
The script also moves the window under the mouse pointer, instead of the currently active one. –  wcoenen Oct 29 '09 at 16:03
    
Whoops! 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 :) –  Phoshi Oct 29 '09 at 16:11
    
Right, edited the script there, try that :) –  Phoshi Oct 29 '09 at 16:14
add comment

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".

share|improve this answer
1  
I feel like a newb for not knowing that +1 –  Ivo Flipse Oct 29 '09 at 15:30
    
Off topic, but how did you make those "buttons"? –  sYnfo Oct 29 '09 at 15:30
2  
@sYnfo wrap the "button" in a <kbd></kbd> tag –  BenA Oct 29 '09 at 15:32
    
+1, thanks for that. I was using Ultramon previously, no longer need it with this. –  Pauk Oct 29 '09 at 15:34
1  
THIS should have been picked as the answer. Glad I found this. –  Bless Yahu Jul 16 '12 at 18:30
show 2 more comments

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!

share|improve this answer
    
Though 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/… –  levitation Jul 7 '13 at 17:50
add comment

is there a way to do this on Mac OS/X?

I am used to using alt+` on XP, a custom shortcut key thanks to UltraMon (which is fantastic for adding a second task bar to your non-primary monitor in windows environments)

ps: UltraMon was not slow at all - it was really really fantastic actually. I haven't upgraded to 7 but maybe they have multi taskbar support natively, but ultramon is still friggin' sweet.

share|improve this answer
add comment

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.