Page 1 of 1

Doubleclick as hotkey?

Posted: 01 Aug 2021, 07:28
by braunbaer
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?)

Re: Doubleclick as hotkey?  Topic is solved

Posted: 01 Aug 2021, 07:41
by mikeyww

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).

Re: Doubleclick as hotkey?

Posted: 01 Aug 2021, 09:35
by braunbaer
Great, thank you!