How to disable the Win key if it's the only key being pressed using AutoHotkey?

1.2k views Asked by At

I often find myself tapping the Win key by mistake, how to disable it when it's the only key being pressed using AutoHotkey?

In other words, tapping Win shouldn't bring up the start menu, but the Win key combination shortcuts should still work, e.g. pressing Win+X should open the quick link menu.

1

There are 1 answers

0
Relax On BEST ANSWER

Quote from #MenuMaskKey:

The Start Menu (or the active window's menu bar) can be suppressed by sending any keystroke. The following example disables the ability for the left Win to activate the Start Menu, while still allowing its use as a modifier:

~LWin::Send {Blind}{vkE8}

Quote from Blind mode:

The Blind mode can be enabled with {Blind}, which gives the script more control by disabling several things that are normally done automatically to make things work as expected.

~LWin::Send {vkE8} may not work in some cases without {Blind}.