Maybe use a queue of keypress events?