updates keypress events