Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Autohotkey: Send only once when held down

Tags:

autohotkey

Here's what I'm trying to do. I want to press the Left shift button down and have it send a double mouse click, then do nothing until the left shift is released, then upon release, send a double click again.

Here's what I have so far:

LShift::Click 2
Return

LShift Up::Click 2
Return

The problem is, when I hold down the shift key, it continually sends the double click, rather than just sending it once and waiting until it is released to send it again. Does anyone know an easy way to fix this?

like image 362
chen Avatar asked Nov 02 '25 09:11

chen


1 Answers

This is what you have to do

LShift::
   Click 2
   keywait, LShift
return

LShift up::
   Click 2
return

The keywait prevents it from repeating the key press

like image 169
Arun Thomas Avatar answered Nov 05 '25 16:11

Arun Thomas



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!