Dismissing macOS modal dialogs


There’s a macOS convention that pressing Command along with the first letter of a push button will press it. This is most useful for quickly dismissing Save dialog boxes for documents I want to discard.

Screenshot from Outlook for Mac showing a save dialog box above a new email.

In the above screenshot, I activated the modal dialog with Command+W, to close the window. Pressing Command+D here presses the “Discard Changes” button, which means my fingers haven’t left the keyboard to close this window.

Unfortunately, support for this time-saving convention is patchy, with even some of Apple’s own tools ignoring it. The following require a trip to the mouse to dismiss their dialog boxes:

  • Apple TextEdit.app
  • Mozilla Thunderbird
  • More I’m blanking on right now

As much as I’ve begrudgingly switched to Outlook for $reasons, being able to dismiss dialog boxes with the keyboard has already made me far more productive. If you’re a macOS developer, please implement this.

Author bio and support


Ruben Schade is a technical writer and infrastructure architect in Sydney, Australia who refers to himself in the third person in bios. Hi!

The site is powered by Hugo, FreeBSD, and OpenZFS on OrionVM, everyone’s favourite bespoke cloud infrastructure provider.

If you found this post helpful or entertaining, you can shout me a coffee or send a comment. Thanks ☺️.