Only run input code when input is pressed, not released.