Drain input buffer of repeated keypresses to prevent overshoot.