Make a new action "escape", bound to the Escape key, and make it