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.

If, for example, Windows Explorer is in the first position of the taskbar and there are multiple explorer windows open, holding the Windows Key and pressing 1 will cycle through the available windows and display an x on the top-right of the selected item that can be clicked to close the window.

Is there a keyboard shortcut to close the selected window while still keeping the window list around (moving to the next item)?

The Windows 7 Taskbar Windows Selector

share|improve this question
    
+1. Please post a screenshot anyway. I didn't know about this feature until I read the question. –  user3463 Jun 2 '12 at 3:38
    
@RandolphWest Done –  Richard Szalay Jun 2 '12 at 3:48
add comment

8 Answers 8

up vote 5 down vote accepted
+50

As other have mentioned, there is no built-in keyboard shortcut. However, we can work some magic with AutoHotkey. I am going to use the Backspace key to close the highlighted Taskbar window:

LastNumber := ""

~*1::LastNumber := "1"
~*2::LastNumber := "2"
~*3::LastNumber := "3"
~*4::LastNumber := "4"
~*5::LastNumber := "5"
~*6::LastNumber := "6"
~*7::LastNumber := "7"
~*8::LastNumber := "8"
~*9::LastNumber := "9"
~*0::LastNumber := "0"

*BackSpace::
    IfWinActive, ahk_class TaskListThumbnailWnd
    {
        WinKey := "LWin"
        if (GetKeyState("RWin"))
            WinKey := "RWin"

        SendInput, {Enter}
        WinClose, A

        SendInput, {%WinKey% Down}{%LastNumber% Down}{%LastNumber% Up}
    }
    else
        SendInput, {BackSpace}
    return

Instructions:

  1. Press and hold the Windows key down. Do not release it until instructed!

  2. Press a number key until the target window is highlighted.

  3. Press the Backspace key. The highlighted window will be closed! If the there is only one window left, then that window will be activated, otherwise the window group list will return.

  4. Repeat steps 2 to 3 to close more windows.

  5. Finally, release the Windows key to be done.

This should work with Taskbar thumbnails enabled or disabled (as shown in the question).

share|improve this answer
    
+1 I like it. Thanks for this magic will test soon. :) –  avirk Jun 9 '12 at 7:38
add comment

looks like no - at least, without using an external program like AutoHotKey

List of shortcut keys from Microsoft

share|improve this answer
add comment

Steps:

  1. WindowsKey+T
  2. Left or Right key to get to the correct app
  3. Up/down arrow to get to the correct app instance
  4. Context menu key (right of spacebar)
  5. C (for Close)
share|improve this answer
    
This closes the entire application, but I'm after a shortcut to close a speciifc window of the application. –  Richard Szalay Jun 6 '12 at 4:11
    
I see. I'm not aware of a way to close a specific window. –  GaTechThomas Jun 6 '12 at 14:34
add comment

I agree with the Autohotkey solution above. Actually I prefer to double-press the ESC button to close (or minimize) current window or current tab in Explorer or Firefox.

You can find a script on Autohotkey forums.

Or even better, you can use Fastkeys, small application which, beside everything else, accepts ahk code - ESC double-press examples (any many others) are already included, so you can use it right away. Recommended.

share|improve this answer
add comment

I found article, check this article .. maybe can help you

Here’s the full list of Windows 7 keyboard shortcuts or accelerator hotkeys available on the operating system level and also for several built-in application programs in Windows 7 .. http://www.mydigitallife.info/windows-7-keyboard-shortcuts-accelerator-keys-or-hotkeys-full-listing/

For keyboard lover, Microsoft has added several keyboard shortcuts, hot keys or keyboard accelerators to make navigation and usage of Windows 7, especially the new Windows Aero snapping feature easier by using keyboard. http://www.mydigitallife.info/new-keyboard-shortcut-keys-hotkeys-in-windows-7/

share|improve this answer
2  
This answer is too generic and doesn't answer the actual question –  Richard Szalay Jun 6 '12 at 4:11
add comment

There is not a keyboard shortcut to do exactly what you want.

You might be able to get close to what you want with a combination of Alt+Tab (holding alt, tapping tab) or with Aero enabled the same thing with Win+Tab. To close the active program use Alt+F4, to close just the active window of a program use Ctrl+F4.

I hope that helps.

share|improve this answer
add comment

Ctrl+W is the keystroke to close a specific window of an application. Like if you have a lot of Explorer windows open and just want to close one. Or if you want to close one tab in your browser.

The list of Windows will remain visible as long as you hold the Win key. You could try pressing Ctrl+W while you hold the Win after using Win+1 to cycle to the window you want.

I can't test this since Win+W is mapped to Settings in Windows 8, but I did test it with another key combination, and the Ctrl key combination still goes to the focused window while pressing the Win key. Win+W is not a standard keyboard shortcut in Windows 7.

share|improve this answer
add comment

You can use Alt+F4 which will close the current active window at that time

share|improve this answer
    
ALT-F4 doesn't work while cycling through taskbar windows without releasing windows key, which is against what I'm trying to do. Besides, ALT-F4 doesn't work for (for example) IE tabs, which appear in the window list in the taskbar. –  Richard Szalay Jun 8 '12 at 9:00
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.