The Exit panel allows you to use keys on the keyboard to exit your publication:
By default, these options are selected. If these options are not selected, you can use the Exit action to close your publication.
The Exit action