I need some code that will convert Fortnite's toggle crouch to a press to crouch. In addition, I need to disable the space bar from sending input while crouched and allow it otherwise. What I have so far is this:
Code: Select all
#If WinExist("Fortnite")
{
$LCtrl::
Send {LCtrl}
KeyWait, LCtrl
return
$LCtrl Up::
Send {LCtrl}
return
}
This works but it doesn't include the space bar restrictions. I want to disable the space bar while I'm physically holding LCtrl but allow it to send input when LCtrl is physically not pressed down. I'm not sure if how I have it now is interfering with my attempts to use if GetKeyState("LCtrl","P"). The $ in front of LCtrl seems to be a hook and from what I gather than connects the logical and physical state of the key.