1

I need that LButton (when up) to release Insert (down and up) key. But it can't release while LButton is down, cuz in the game that I play, one action cancels the other. I made a script that almost do that, but when I do that fast, one action begins to cancel the other, like LButton (down) was being pressed at the same time that Insert are.

Actual script:

LButton up::

Send {Ins up}

Return

1 Answer 1

0

Here are some things you could try:

Add SetBatchlines -1 to the beginning of your script, to make it run faster.
Use SendInput instead of Send. Because it is faster.
Send and {LButton Up} command right before the {Ins up}.
Wait for the LButton key to be released using KeyWait.

SetBatchLines -1
LButton up::
    KeyWait, LButton
    SendInput, {LButton Up}{Ins up}
Return
Sign up to request clarification or add additional context in comments.

3 Comments

Didn't worked, LButton and Ins continues to be sent at the same time.
This worked for me: ~LButton:: Sleep 3 SendInput {Ins} Return
Yes, that makes sense. Stupid me... LButton Up overrides the native function of that key. Removing the KeyWait, LButton from my example might also do the job btw.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.