Win Key long-press problem Topic is solved

Get help with using AutoHotkey and its commands and hotkeys
Lem2001
Posts: 63
Joined: 27 Jun 2017, 17:59

Win Key long-press problem

13 Mar 2020, 16:16

I have the code example below which works fine:

Code: Select all

F7::
KeyWait,F7
if A_TimeSinceThisHotkey >= 700 ; in milliseconds.
MsgBox,Long  Keypress.
else
MsgBox,Short  Keypress.
return
However, I would like to do the same using the Win Key. But if I simply substitute LWin for F7 in the example above, it does not work.

Code: Select all

LWin::
KeyWait,LWin
if A_TimeSinceThisHotkey >= 700 ; in milliseconds.
MsgBox,Long  Keypress.
else
MsgBox,Short  Keypress.
return
With the LWin example, no long-press is ever detected.

Does anybody know why, and how I can fix this?
User avatar
boiler
Posts: 5556
Joined: 21 Dec 2014, 02:44

Re: Win Key long-press problem  Topic is solved

13 Mar 2020, 20:22

Both work for me. Maybe double-check that you are running the right version of the script when you press LWin.
Lem2001
Posts: 63
Joined: 27 Jun 2017, 17:59

Re: Win Key long-press problem

14 Mar 2020, 14:29

Thanks for letting me know that it works for you.

This confirmed that it was not a key-specific issue, but was instead something on my system.
I went back and checked my code and found another part of a script that was interfering with it.

It's working now.

Return to “Ask For Help”

Who is online

Users browsing this forum: 2ndprotocol, Chunjee, Google [Bot], honarjoo, randysejas and 57 guests