using keyboardevent instead of timer. much more responsive.