add a escape event to exit