I know I could use AHK to bind keys to bring a predefined window into focus, but I'm looking for a utility that will allow me to assign shortcut keys on-the-fly to bring a specific window into focus.
Ideally:
Does anything like this exist?
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 know I could use AHK to bind keys to bring a predefined window into focus, but I'm looking for a utility that will allow me to assign shortcut keys on-the-fly to bring a specific window into focus.
Ideally:
Does anything like this exist?
In Windows 7, the first 10 programs on your taskbar automatically have hotkeys assigned based on their position in the taskbar. Pressing Win + 1 will activate the first program on the task bar (or launch it, if it's not open). Win + 2 activates the second, and so on up to Win + 0 activating the 10th. The programs do not need to be pinned to the task bar for this to work, but programs that are pinned can be launched with those shortcuts in they are not open.
I made a tool exactly for that : https://hyperkeys.xureilab.com
You can set your own shortcut to pin then bring back a window. I personally use respectively SHIFT+ALT+A and ALT+A (azerty keyboard).
Note that on Windows 10, the OS unmaximize a window when you force it to the front via a third-party app. I didn't find a workaroung this yet. But full-screen apps stay full-screen.
win
+s
for a particular editor window, win
+b
for a particular browser window, etc. I did end up writing my own (barely functional) implementation of this that uses key chords: caps
+k
enters assignment mode, then whatever you press next is bound as the shortcut for the active window. Works well for me.
ShowWindow(hwnd, SW_RESTORE)
, which tells Windows to restore (ie unminimize or unmaximize) the window. You probably want to detect whether the window is currently minimized, and use SW_RESTORE
if it is, otherwise SW_SHOW
.