Prompt on MacOS

On Windows you can use the TAB key to switch between which button has focus then press space to click the focused button.

However, on MacOS, when presented with the dialog in this screenshot, I cannot seem to use tab to switch between the buttons I want to click. I can only hit RETURN to click the Save button, or ESC to click Cancel. But I have no idea how I can click the "Don't Save" button using just the keyboard.

How can I navigate/click buttons in a MacOS message box using just the keyboard (not the TouchBar, Mouse or TrackPad)?

3 Answers 3


Actually, you can achieve the same behaviour in macOS!

First, you need to do as follows:

  1. Go to Apple > System Preferences > Keyboard
  2. Select the Shortcuts tab
  3. Tick the All Controls radio button (see below)

  1. Now exit System Preferences

Once you've done this, you can use the Tab key to navigate the various options (incl. buttons) in Dialog boxes. In the screenshot below I've selected the Don't Save button.

Once selected, just press the space bar as you would in Windows!

  • This is exactly what I wanted. Weird that this is not the default. Thank you! Commented Jun 11, 2018 at 8:57

It used to be that in the message box you show, the return key saves, the esc key cancels, and -d does the "Don't Save".

However, this is apparently not universal, and may not apply in every box you get. Try it and see.


You ca enable Mouse Keys in the Accessibility options and use the keyboard to move the mouse pointer around.

Or you can enable full keyboard access to all controls in System Preferences/Keyboard/Shortcuts — see this answer.

  • That seems like even more work than using a mouse/trackpad. Surely there is a better alternative for power users? Commented Jun 11, 2018 at 6:17
  • @CodeAndCats Yes, there is another way, and I’ve edited my answer to include it. Your question didn’t specify that convenience was the driver, so I gave the all-purpose way to use the keyboard instead of the mouse.
    – Mike Scott
    Commented Jun 11, 2018 at 6:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .