Shortcut in Windows 7 to switch between same application's windows, like Cmd + ` in OS X

Is there a shortcut in Windows 7 to switch between windows in a given application only? I very much like this feature in OS X; what is its equivalent in Windows?


If it is one of the first ten applications on the taskbar, then (Win)+n, where n is its position number, will select it and cycle through the windows.  (Use 0 (zero) for the tenth application.)  For example, I have Windows Explorer and Internet Explorer pinned as the first two things on my taskbar, so I can use +1 to cycle through my directories and +2 to cycle through my browsers.


Some odd notes:

  • If you press and hold and type (and release) a digit n, Windows will open the nth application on the taskbar.  Repeatedly tapping n will cycle through the windows of that program, as discussed above.  As stated by TranslucentCloud, if you then type Shift+n, it will cycle through them in reverse order, as with Alt+Tab and Ctrl+Tab, etc.

    If the nth application on the taskbar is pinned but not running, then +n will start it. 

  • But, if you press and hold and Shift, right from the beginning, and then type n, Windows will start a new instance (or at least a new window) of that application, even if it’s already running.  (This will fail for some applications, like Windows Media Player, that don’t allow multiple windows to run simultaneously.)
  • +n seems not to work with the numeric keypad.

In Windows 7 and 8, although there is no shortcut I know of available from the keyboard alone, you can hold Ctrl while clicking the taskbar icon of the app you're interested in. Each time you do this a different window belonging to that app will come to the forefront.

In addition, the program VistaSwitcher sets up Win+F11 and Alt+` to switch between the current app's windows. (BTW, its web site says Windows 8 is not supported, but I've had luck with it under 8.1; the only problem I've seen so far is that it sometimes lists things like the search sidebar as open windows. I just ignore that, but YMMV.)


You can use AutoHotkey: www.autohotkey.com

And put this script there:

!`:: ; Next window
WinGetClass, ActiveClass, A
WinGet, WinClassCount, Count, ahk_class %ActiveClass%
IF WinClassCount = 1
    Return
Else
WinGet, List, List, % "ahk_class " ActiveClass
Loop, % List
{
    index := List - A_Index + 1
    WinGet, State, MinMax, % "ahk_id " List%index%
    if (State <> -1)
    {
        WinID := List%index%
        break
    }
}
WinActivate, % "ahk_id " WinID
return

!^`:: ; Last window
WinGetClass, ActiveClass, A
WinGet, WinClassCount, Count, ahk_class %ActiveClass%
IF WinClassCount = 1
    Return
Else
WinGet, List, List, % "ahk_class " ActiveClass
Loop, % List
{
    index := List - A_Index + 1
    WinGet, State, MinMax, % "ahk_id " List%index%
    if (State <> -1)
    {
        WinID := List%index%
        break
    }
}
WinActivate, % "ahk_id " WinID
return

Works very well for me. Using Autohotkey I also made my copy/paste/undo,... keys like Mac. Works great!

Eras


Thanks, Erasmose, but your version of the autohotkey script will minimize a window if there are no other windows of that type. Sometimes you don't know, and minimizing is an annoying way to find out, so I modified your script like so:

!`::    ; Next window
WinGetClass, ActiveClass, A
WinGet, WinClassCount, Count, ahk_class %ActiveClass%
IF WinClassCount = 1
    Return
Else
WinSet, Bottom,, A
WinActivate, ahk_class %ActiveClass%
return

!+`::    ; Last window
WinGetClass, ActiveClass, A
WinActivateBottom, ahk_class %ActiveClass%
return

oh, and I also changed last class to use shift instead of ctrl since I that's the modifier to go backwards with several other keyboard shortcuts. I love autohotkey.