nicer event listener for keydown handleEvent