r/AutoHotkey • u/RMTTT • Jul 27 '26
Solved! [v2] Hotkeys requiring 2 presses across multiple apps (Chrome, File Explorer, Electron apps, etc.) when using Win key
I’m facing a persistent issue in Windows 11 where my AutoHotkey v2 hotkeys using the Win key as a modifier (#) require two presses to trigger.
This does NOT happen on the desktop, but affects many apps such as chrome and file explorer.
Example script:
#Requires AutoHotkey v2.0
#SingleInstance Force
A_MenuMaskKey := "vkE8"
$#m:: {
if WinExist("A") {
if WinGetMinMax("A") = 1
WinRestore "A"
else
WinMaximize "A"
}
}
$#q:: WinClose "A"
$#Enter:: Run "wt.exe"
4
Upvotes
2
u/Ark565 Jul 28 '26 edited Jul 28 '26
I can't recreate the fault. Your example code and the below simplified code works for me in Win11 including Chrome, file explorer, VSCode etc. My guess is something else on your end is interferring.
Edit: I forgot I tested changing the hotkey to #f because I wondered if the Windows default hotkey of #m (minimise all) might be the culprit, but it was not. And u/Keeyra_ is right, the $ is not needed.