adds keypress events