Can I set a delay between a {blind} and another key?

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Benjamin007
Posts: 1
Joined: 05 Jul 2022, 05:14

Can I set a delay between a {blind} and another key?

Post by Benjamin007 » 06 Jul 2022, 02:15

Hello guys, could you help me to set a delay between shift and p
I want it to be shift p p p p p p p p p p p p p = P P P P P P P P P P P P P P P P P
but I want to make sure shift is pressed before the P, so I want to set a small delay between shift and p

Code: Select all

~shift::
    Send, {Blind}{p Down}
return
~shift up::
    Send, {Blind}{p up}
return

Rohwedder
Posts: 7647
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: Can I set a delay between a {blind} and another key?

Post by Rohwedder » 06 Jul 2022, 03:12

Hallo,
try:

Code: Select all

~shift::
KeyWait, Shift,% A_PriorHotkey<>A_ThisHotkey?"T.5":"T0" ;initial delay 0.5 seconds
Send,% ErrorLevel?"{Blind}{p Down}":""
return
~shift up::
Send, {Blind}{p up}
return

Post Reply

Return to “Ask for Help (v1)”