change keyPressHandler method in EventHandler class