1

Win+Shift+Up maximizes the active window vertically while maintaining its width.
Win+Shift+Down used to do the reverse, that is, restore the previous vertical dimensions.

The latter stopped working in Windows 10 20H2 (maybe already in 2004). Instead, Win+Shift+Down now always minimizes the window like Win+Down, as if ignoring the Shift modifier. I tested this on several independent installations and also in Safe Mode.

EDIT: I also checked with Spy++. The key messages go to the respective active window (as expected), except for VK_DOWN which doesn't appear. Instead a WM_SYSCOMMAND with SC_MINIMIZE is received. There are no WM_HOTKEY messages.

Is there some way to restore the previous behavior?
Is there some other keyboard shortcut to undo the vertical maximization?

nmatt
  • 206
  • 1
  • 4

1 Answers1

0

Instead on counting on Windows for consistency across upgrades, you may use the free AutoHotKey to create your own hotkeys.

The following script implements your hotkeys:

sysget, SM_CYMAXIMIZED, 62                  ; Get maximised window size
sysget, SM_CYEDGE, 46                       ; Get 3D border size
return
; maximize vertically
#+Up::
WinGetClass, class, A
WinGetPos, X, Y, W, H, A
WinMove, ahk_class %class%, , (X), (0-(SM_CYEDGE*2)), (W), (SM_CYMAXIMIZED)
return
; un-maximize
#+Down::
WinMove, ahk_class %class%, , (X), (Y), (W), (H)
return

After installing AutoHotKey, put the above text in a .ahk file and double-click it to test. You may stop the script by right-click on the green H icon in the traybar and choosing Exit. To have it run on login, place it in the Startup group at C:\Users\USER-NAME\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup.

One slight problem with the above script is if you maximize one active window, then activate another window and press the unmaximize hotkey, this will resize the second window to the old height of the first window. If this is a problem, the script can be improved.

harrymc
  • 498,455