Apple - How can I switch dialog buttons using the keyboard?
Go to...
- System Preferences→Keyboard→Keyboard Shortcuts
and select All controls under Full Keyboard Access
- Now you can use ⇥ (tab) to switch between the dialog boxes.
- Note: Unlike in Windows, you need to hit space to trigger a highlighted box that is not the default one! (If this is not natural to you, here's something that helps many to remember tab and space rather than just enter. The space bar is the keyboard version of a one button mouse with the tab moving the mouse's pointer for you.)
On version 10.15.6, the previous answer didn't work as is.
If you want to switch with Tab or "don't save" directly with the Space key, you'll need to go to System Preferences → Keyboard and toggle this option: