Use keycode to check for ESC