MacOS – How to close a window without the application quitting

macosshortcut

The OS X menu allows exit, minimize and maximize:

enter image description here
I know the following shortcuts:

Exit: command+Q
Minimize: command + M
Maximize: ?

When I use command+Q to exit the behavior differs from clicking the red button. I want the UI to close and the application to remain running. Instead, the application exits entirely.

How can I accomplish this with a keyboard shortcut?

Best Answer

You always have the option to hide the active program. When the application in question is active (in front of all others) there are 2 options:

  1. option +click on the Desktop
  2. command +h

The first option always works or at least I can't think of any exceptions this minute. The second is supported by most applications.

In either case:

  1. Your session will be preserved.
  2. Neither will cause these windows to be displayed in the Dock where the minimized programs are located.
  3. You'll need both hands.

So, if you're scanning eBay at work, you'll likely only look suspicious. But, if you lean into it and use + (command+tab) PLUS +h in succession, you might actually look like you're doing work.

But, in the event you're asked to bring your browser back to the forefront you'll be busted. It will display exactly what you were looking at when you hid it.

You can imagine how I know this :-)