On Windows Vista, I'm familiar with Win + D to show the desktop but sometimes I just want to minimise two or three windows as they become active and not the whole lot.
What hotkey can I use to minimise only the currently active window?
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.
Sign up to join this communityI've been using the shortcut Alt+Space followed by N for years. Works on any Windows version, all the way back to Windows 3.0! It should work with all keyboard layouts and probably even all Windows localizations.
Alt+Space opens the general windows menu. You can open it manually by left-clicking with the mouse on the top left window corner.
The menu contains the options to maximize, minimize, close the window, etc. It also underlines the key you need to press to select the appropriate option ("miNimize").
The N is not a general "hotkey" but an access key – a keyboard shortcut to an entry in a GUI menu that works only if/after the menu opens. The menu items texts differ across localizations (languages), which is why a different letter might be underlined and serve as the access key.
A small workaround is Alt + Esc – it doesn't minimize the active window but places it behind all other windows. The effect is similar however.
I know it's not precisely what the question asker wanted, but it's a built-in Windows one-step solution that works in a similar way.
In Windows 7 and later you can minimize the currently active window with: Win+Down.
(This may be an Aero feature that works with Vista as well.)
When maximized:
When not maximized:
AutoHotKey script for Minimize:
;=============================================================================;
; WINDOWS KEY + Alt + Down -- Minimizies Active window
;=============================================================================;
; instead of "Restore Down" for Win+Down
#!Down::WinMinimize, A
Explanation:
[Key-Combination]::[Action]
#!Down
- will execute when Windows-Key (#
), Alt-Key (!
), Down-Arrow-Key (down
) are pressed togetherWinMinimize, A
will mimimize (WinMinimize
) the active (A
) windowaccording to microsoft support, there isn't one, but it is easily scripted in autoit.
EDIT: Below is a very very basic sample of how to accomplish a hotkey to minimize the focused window, fully commented.
#include <WinApi.au3> ;include winAPI library
HotKeySet("!M",'_MinimizeActive') ;sets hotkey to Alt+Shift+m to trigger function
While 1 ;loop to keep alive
WEnd
Func _MinimizeActive()
Local $v_Wnd, $w_Wnd ;declare variables
$v_Wnd = _WinAPI_GetFocus() ;get focused window
$w_Wnd = WinGetHandle($v_Wnd) ;get handle of focused window
WinSetState($w_Wnd,"",@SW_MINIMIZE) ;minimize focused window
EndFunc
If what you want is an easy way to open and minimize a window you use often, just pin it to the task bar and move it to one of the first positions. Then you can use Windows
+1
, 2
, 3
etc. to quickly toggle the window.
No more scrolling through loads of windows with ´Alt´+´Tab´ to maximize it again either.
Because windows doesn't have a shortcut key for it, you may use a 3rd party solution, like autoit to do that.
Below is a simple script for it. This first to set a hotkey (with HotKeySet()), than minimize current window (with WinSetState()).
#include <WinApi.au3>
HotKeySet("!M",'MinimizeWin') ;Alt+Shift+m
While 1
Sleep(100)
WEnd
Func MinimizeWin()
WinSetState("[ACTIVE]", "", @SW_MINIMIZE)
EndFunc
Although this is also another two-step solution, but I find it more nerve-friendly as it clears everything from my mind on the first step:
win+downarrow+win+downarrow
redundant and repetitive. All I want is to minimize some window I don't need so that it's closed in my mind too. So I think using win + D
or win + m
to minimize all windows, is not that bad, if it's followed by alt + tab
.