track keypress events