Fix keypress events