AutoHotkey: Disable Windows Key

By Xah Lee. Date: . Last updated: .

Disable Windows Key Completely

#Requires AutoHotkey v2.0
;; disable the Win key completely
Lwin::return
Rwin::return

Disable Windows Key Start Menu Behavior

#Requires AutoHotkey v2.0
; disable Win key behavior of popping up the Start Menu, but still allow Win+key combination.
~LWin::Send("{Blind}{vkE8}")
~RWin::Send("{Blind}{vkE8}")

Disable Win+key Combination

#Requires AutoHotkey v2.0
;; disable some Win+key combination
#1::Return
#r::Return
#e::Return

Note: the ❖ Window+l (lock computer) cannot be disabled.