Input Held Down?

maybe a while loop and have a bool set to true when pressed, and set false when released?