Is there a way to make an input key act like it is held down yet it was only momentarily pressed?

the word you are looking for is “toggle”, my friend.