Handle ESC key.