How to keep any window always on top with a hotkey
Create a KeyRoutines routine with a Hotkey trigger and a Get window info step for the window in front. An If with Compare values checks its isTopmost output, and Window state either sets the window to keep on top or takes it off the top.
Steps
- 1
Add a Hotkey trigger
Pick a chord such as Ctrl+Alt+T.
- 2
Read the front window
Add Get window info with Use the window in front turned on.
- 3
Check if it's pinned
Add an If with Compare values that checks the step's isTopmost output is true.
- 4
Toggle on top
In the If branch, add Window state set to not on top; in the Else branch, set it to keep on top. Point both at the window from Get window info.
Tips
- KeyRoutines never changes the windows of protected games, so this won't pin a game window.
- PowerToys also has an always-on-top shortcut; this routine is handy if you want it to do more, such as moving the window to a corner at the same time.
Questions
- Does it work on every app?
- It works on normal desktop windows. Some apps that run as administrator can only be changed when KeyRoutines' admin features are on.
- Can I pin a specific app instead of the front window?
- Yes. Skip Get window info and pick the app in Window state's window field.