Detecting Backwars Movement - 1.20.6

Hey, so I am wanting to create.a sword that when you hold the backspace key you dash forwards and if I recall that was made possible in 1.20.5? How do I do that easily and efficiently lag wise? I want the player to hold it for 6 ticks then run ability.
Continue to help post