Fix keypress callback