I come from a Windows background and I have gotten into the habit of hitting the Space key every time there's a popup on my screen that I want to close. But on the Mac, it doesn't do anything, but hitting Return does. Does anyone know how I can get Mac to let the space key act like the Return key on modal dialogs? I tried to find something in the Keyboard preferences but don't see anything related to popups.

  • You could try a key remapping program. At lifehacker (lifehacker.com/5882684/the-best-keyboard-remapper-for-mac-os-x) the KeyRemap4MacBook (pqrs.org/macosx/keyremap4macbook) is recommended. I've not tried it, but it might work for you. Oct 22, 2012 at 23:33
  • i think the issue is not that space needs to be return, but that space should be able to interact with dialog boxes Oct 23, 2012 at 4:28
  • Can we improve things to get you to indicate which answer works to solve your question?
    – bmike
    Oct 28, 2012 at 22:26
  • Unfortunately none of the proposed solutions does exactly what I asked for, but I have to assume that getting the exact functionality won't be possible at this point in time.
    – paul smith
    Oct 29, 2012 at 15:44
  • It sounds like you're after the Windows method because its the Windows method. With most things Mac vs Windows, the same will be achievable with much the same efficiency, but you'll need to 'Think Different' as they say. The interface or method will be a little different, and if you try to make one just like the other, you'll be disappointed. If you can manage to drop the expectations of one behaving exactly like the other (and it goes both ways!) then you'll find efficient, but slightly different, ways of working on either system. Oct 30, 2012 at 4:15

1 Answer 1


Press ctrl+F7 to enable Full Keyboard Access. This setting is also available in the System Preferences under the Keyboard preference pane:

enter image description here

By selecting 'All controls', you can tab around keyboard focus between the various widgets in dialog boxes, including buttons like OK or Cancel. It's slightly different from Windows, in that return is like pressing the fully highlighted button, while space is like pressing the selected / outlined button.

This image shows the difference between the two:

enter image description here

In this example, the Cancel button has focus (from tabbing) while OK is the default. So pressing space would select Cancel, while return would select OK.

And for completeness, this one can be accepted by either space or return:

enter image description here

It's worth noting that some OS X dialog boxes (I've noticed this especially with dialogs asking whether it's OK to overwrite a file) will come up with, for example, Don't Overwrite as the default for return, and Do Overwrite as the focused item for space. This makes it a single key either way to do what you want, but you need to be sure you've got the right one!

  • 1
    Awesome! This is precisely THE way to get that functionality.
    – duci9y
    Oct 23, 2012 at 4:51
  • 1
    Selecting this answer, but note that it is not the exact behavior of Windows since I do have to tab around before I can hit the space, where as in Windows tab was typically not necessary since the focus was usually on the main button of interest (like OK or Save). But I have a feeling this is the closest we can get.
    – paul smith
    Oct 29, 2012 at 15:46
  • I believe this behaviour is changed in macOS Ventura - do you agree? Now when I get a dialog there is no highlighted button, just a selected button (highlighted border like "Cancel" in pic above). Does anyone have a solution to get macOS to revert to previous behaviour?
    – Dan
    Feb 10 at 19:53

You must log in to answer this question.

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