I wrote a little script for Player Unknown's Battlegrounds which I want to share with you. If you Double-Press q or e (default keys for leaning left and right) the character will stay leaned into that direction, you can cancel this by pressing q or e again. If you single click leaning works normally (lean on press, stop leaning on release).
Code: Select all
#NoEnv
SendMode Input
SetWorkingDir %A_ScriptDir%
#IfWinActive ahk_class UnrealWindow
q::
if (A_PriorHotkey <> "q" or A_TimeSincePriorHotkey > 400)
{
Send {q down}
KeyWait, q
Send {q up}
return
}
Send {q down}
KeyWait, q, D
return
Return
e::
if (A_PriorHotkey <> "e" or A_TimeSincePriorHotkey > 400)
{
Send {e down}
KeyWait, e
Send {e up}
return
}
Send {e down}
KeyWait, e, D
return