Press Esc
Which Key Closes or Hides a Dialog Box? (Keyboard Shortcut Explained)

Learn which key is used to quickly hide or close a dialog box without applying changes—usually the Escape (Esc) key.

Escape Key Magic
Which Key Cancels a Menu or Dialog Box? Understanding the Escape (Esc) Key

Learn which key cancels menus or dialog boxes quickly. The Escape (Esc) key is the universal shortcut to exit dialogs and menus smoothly.