Fix to get KeyEvent information correctly