my player character currently has a speed boost/dash using the space bar. I just have it set for
player default max speed at 100
Space bar is pressed (not held), set player max speed at 150
Space bar is released, set player max speed at 100
then throw in appropriate animation changes on each event. The space bar will still register as "being pressed" and continue to have him dash at 150 while holding it down. But with it on pressed (not held) you can interrupt the dash with collisions and other events, making the player retrigger the dash manually as they see fit, vs being able to just hold dash down which will basically tell the character to constantly dash forever regardless of what is happening or whatever rules you set in place.