I'm trying to bind "Esc" key to lock my computer with AutoHotkey.
Manually pressing Winkey + l
will lock my computer, but it doesn't work in my AutoHotkey script.
esc::
MsgBox Going to lock
Send, #l
Return
I have tried multiple other AutoHotkey syntax (without the modifier for example) without success.
DllCall("LockWorkStation")
instead ofsend #l
– wOxxOm