xxxxxxxxxx
sendinput, {W Down}
sleep,50 ;miliseconds
sendinput, {W Up}
;Replace W with any valid key. See https://www.autohotkey.com/docs/commands/Send.htm#keynames
xxxxxxxxxx
~BackSpace::
KeyWait, BackSpace
MsgBox, %A_ThisHotkey% held down for %A_TimeSinceThisHotkey%ms
return