A script for delaying the press of control Topic is solved

Ask gaming related questions
Vayash
Posts: 2
Joined: 24 Mar 2023, 11:22

A script for delaying the press of control

Post by Vayash » 24 Mar 2023, 11:26

Hello, I find myself in need of a script that would delay the pressing of my control button by 15 milliseconds whilst preserving all other behavior of the button. So that holding it would be possible as normal. Basically i want to be able to crouch, and then stay crouched as long as I'm holding control, but with 15ms delay from when i press control. I have no clue how to make any scripts by myself, so I'm asking for help here. Thank you very much.

User avatar
mikeyww
Posts: 26595
Joined: 09 Sep 2014, 18:38

Re: A script for delaying the press of control  Topic is solved

Post by mikeyww » 24 Mar 2023, 20:16

Welcome to this AutoHotkey forum!

Code: Select all

#Requires AutoHotkey v2.0
LCtrl::
RCtrl:: {
 Sleep 15
 Send '{' ThisHotkey ' down}'
 SoundBeep 1500
 KeyWait ThisHotkey
 Send '{' ThisHotkey ' up}'
 SoundBeep 1000
}

Vayash
Posts: 2
Joined: 24 Mar 2023, 11:22

Re: A script for delaying the press of control

Post by Vayash » 24 Mar 2023, 21:14

Works perfectly, does exactly what i wanted, thank you so much.

Post Reply

Return to “Gaming”