keyboard interrupt to detect Esc