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:
- option ⌥+click on the Desktop
- 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:
- Your session will be preserved.
- Neither will cause these windows to be displayed in the Dock where the minimized programs are located.
- 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 :-)
Is there any keyboard shortcut or any app that ALWAYS closes the focused window? I would love to use cmd+w but some apps overtake the behavior and just close a tab instead. I don't like this inconsistency. The only thing that is consistent is the red window button. However it takes time to always move the cursor to the red button.
Anyone knows a way to bind a keyboard shortcut to clicking the red dot? BetterTouchTool has a "click red window button", but in some apps it doesn't work.
Same for CMD+H, some apps don't react to it (PDFSearch e.g.), but they react to the red window button click.
Thank you!
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:
- option ⌥+click on the Desktop
- 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:
- Your session will be preserved.
- Neither will cause these windows to be displayed in the Dock where the minimized programs are located.
- 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 :-)
Typically, an application will offer a way to both close the UI and quit the application. These are usually standardized to command ⌘+W to close the UI/window and command ⌘+Q to quit the application.
Some applications will still quit entirely when you use command ⌘+W, such as Preview. You can usually rely on this shortcut to close the window without quitting, however.
I should also point out that the red button in the top left does not "quit" the application as you mentioned in the question body. It will close the window (just like command ⌘+W).
Edit: In recent versions of macOS, with the advent of tabs, the behavior is slightly different:
| Keyboard | Effect |
|---|---|
| command ⌘+W | Closes the Tab |
| command ⌘+shift+W | Closes the Window |