TildeWin: macOS-style window switching on Windows
One shortcut I keep missing on Windows is Cmd + grave from macOS. If you have multiple windows open from the same app, it cycles through only those windows. It is especially useful with browsers, terminals, editors, and File Explorer.
Windows has Alt + Tab, but that cycles through every window. It also has taskbar grouping, but cycling through a grouped app usually means reaching for the mouse. I wanted the same direct keyboard behavior, so I made a tiny AutoHotkey script called TildeWin.
What it does
TildeWin adds these shortcuts:
Win + grave: switch to the next window in the current app.Win + Shift + grave: switch to the previous window in the current app.
So if I am focused on a Chrome window, Win + grave moves to another Chrome window. If I am focused on VS Code, it cycles through VS Code windows. Other apps stay out of the way.
Why AutoHotkey
AutoHotkey is still the simplest tool for this kind of Windows automation. The script can ask Windows which window is active, find other windows from the same process, filter out windows that should not be switch targets, then activate the next one.
For this first version, grouping is based on executable name:
chrome.exeCode.exeexplorer.exenotepad.exe
That covers the apps I use most. It is not a perfect clone of Windows taskbar grouping, but it is small, predictable, and easy to change.
The script
The full script is in the repo:
https://github.com/ibnuh/tildewin
The important part is this:
#vkC0::SwitchSameAppWindow(1)
#+vkC0::SwitchSameAppWindow(-1)
vkC0 is the grave/backtick key on a US-style keyboard. I used the virtual key name because the backtick character has special meaning in AutoHotkey strings and comments can get confusing quickly.
The script skips windows that should not behave like normal app windows:
- minimized windows
- hidden or cloaked windows
- tool windows
- no-activate windows
- disabled windows
- desktop and taskbar shell windows
This makes the shortcut feel closer to how I expect app window switching to work.
Setup
- Install AutoHotkey v2.
- Download or clone TildeWin:
git clone https://github.com/ibnuh/tildewin.git
- Run
tildewin.ahk. - Open multiple windows from the same app.
- Press
Win + grave.
To run it automatically on startup, put a shortcut to tildewin.ahk in the Windows Startup folder.
Changing the hotkey
If Win + grave does not feel right, the script includes Alt + grave bindings as comments:
; !vkC0::SwitchSameAppWindow(1)
; !+vkC0::SwitchSameAppWindow(-1)
Uncomment those lines and comment out the #vkC0 lines:
; #vkC0::SwitchSameAppWindow(1)
; #+vkC0::SwitchSameAppWindow(-1)
!vkC0::SwitchSameAppWindow(1)
!+vkC0::SwitchSameAppWindow(-1)
In AutoHotkey syntax, # means Win, ! means Alt, and + means Shift.
Things to know
- Admin windows may need the script to run as administrator.
- Browser tabs are not separate windows. This switches browser windows, not tabs.
- Apps with unusual window models may not behave perfectly.
- The current version does not use Windows AppUserModelID yet, so process-name grouping is the main rule.
That is enough for my daily use right now. It is one of those tiny utilities that removes a little friction every time I switch contexts.