keyHandler: prevent keypress spamming