#1: fix rollover keydown; small refactoring