fixed bug where multiple keypresses could be registered per interval