Doubleclick as hotkey? Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
braunbaer
Posts: 478
Joined: 22 Feb 2016, 10:49

Doubleclick as hotkey?

01 Aug 2021, 07:28

LButton:: is called as reaction to a single left click of the mouse.
Is it possible to define directly a mouse doubleclick as hotkey (with using some workaround like a timer?)
User avatar
mikeyww
Posts: 26857
Joined: 09 Sep 2014, 18:38

Re: Doubleclick as hotkey?  Topic is solved

01 Aug 2021, 07:41

Code: Select all

LButton::
KeyWait, %A_ThisHotkey%
KeyWait, %A_ThisHotkey%, DT.3
Send % ErrorLevel ? "Once" : "Twice"
Return
You need the wait to see whether the second click occurs. If the actions will send text to an editing window, then you can skip the wait by sending a backspace if needed, to undo the action. There is otherwise typically not a way to undo an action (depending on the circumstance).
braunbaer
Posts: 478
Joined: 22 Feb 2016, 10:49

Re: Doubleclick as hotkey?

01 Aug 2021, 09:35

Great, thank you!

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: TAC109 and 106 guests