Alt+F4 on a Mac: How to Close a Window or Quit an App
The Mac’s version of Alt+F4 is Command+W: it closes the window in front.
- To quit the whole app, press Command+Q.
- Unlike on Windows, closing an app’s last window often leaves the app running on a Mac, which is why Command+Q exists.
- Option+Command+W closes every window of the app.

On this page
Alt+F4 on Windows vs. a Mac
| What you want | On Windows | On a Mac | With WinPlug |
|---|---|---|---|
| Close the window | Alt+F4 | Command+W | Alt+F4 or Command+W |
| Quit the app | Alt+F4 on its last window | Command+Q | Command+Q |
| Close every window of an app | — | Option+Command+W | Same as Mac |
| Close a browser tab | Ctrl+W | Command+W | Ctrl+W |
| Minimize the window | Win + ↓ | Command+M | Win + ↓ or Command+M |
| Close a frozen app | Ctrl+Shift+Esc | Option+Command+Esc | Ctrl+Shift+Esc opens Activity Monitor |
| Shut down | Alt+F4 on the desktop | Apple menu > Shut Down | Same as Mac |

Mac built-in vs. WinPlug Keyboard
Your Mac has everything you need: Command+W for the window, Command+Q for the app. WinPlug lets you keep the Windows keys.
| Mac (built-in) | WinPlug Keyboard | |
|---|---|---|
| Shortcut | Command+W | Alt+F4, on a Windows keyboard or a Mac keyboard |
| In a browser | Command+W closes the tab | Alt+F4 closes the whole window, like on Windows |
| The app’s last window | The app often keeps running | Same: the window closes, the app stays open (Command+Q quits it) |
| F4 on a Mac keyboard | Runs the feature printed on the key | Alt+Fn+F4 closes the window |

How do I close a window on a Mac?
- Click the window you want to close.
- Press Command+W. Or click the red button in the top-left corner of the window. Or choose File > Close.

If the window has unsaved changes, the app asks whether to save them first.
To close every window of the app at once, press Option+Command+W. In a web browser, Command+W closes the current tab, not the whole window.
How do I quit an app on a Mac?
- Keyboard: press Command+Q.
- Menu bar: click the menu with the app’s name, next to the Apple menu, and choose Quit.
- Dock: Control-click the app’s icon and choose Quit.

A dot under an app’s icon in the Dock means it’s still open.

Why does the app stay open when I close its window?
On a Mac, a window and its app are two separate things. Many apps keep running with no window open, so they can open a new one quickly or keep working in the background. On Windows, Alt+F4 on the last window usually closes the program too.
It’s not a problem: an idle app uses very little. But if you want it gone, use Command+Q.
What does the F4 key do on a Mac?
On Mac keyboards, the top row controls Mac features by default, such as brightness and volume. F4 runs the feature printed on it. To use it as a real F4:
- Hold Fn (or the globe key) and press F4. Or:
- Choose Apple menu > System Settings > Keyboard > Keyboard Shortcuts > Function Keys, then turn on Use F1, F2, etc. keys as standard function keys.
That’s why Alt+F4 on a Mac keyboard, even with an app that supports it, means pressing Option+Fn+F4.
What if the app is frozen?
If Command+Q does nothing, the app isn’t responding. Press Option+Command+Esc, select the app and click Force Quit. More ways in our guide on how to force quit on a Mac.
Can I use Alt + F4 on a Mac?
Yes, with WinPlug. No need to relearn your habits: keep your Alt+F4.
With WinPlug, Alt+F4 closes the window you’re in, like on Windows. It never quits the whole app by surprise: the app’s other windows stay open. In a browser, it closes the whole window, not just the tab.
It’s on as soon as you install WinPlug, and you can turn it off in Settings > Keyboard. On a Windows keyboard, press Alt+F4. On a Mac keyboard, Alt is Option, so press Option+Fn+F4.
One difference from Windows: when you close an app’s last window, the app keeps running, as with the red button. Press Command+Q to quit it.
WinPlug brings back the rest of your Windows keys too: Ctrl+C and Ctrl+V, Ctrl+Alt+Delete for Activity Monitor, Alt+Tab. Use Windows keyboard shortcuts on your Mac.

Keep your Windows habits on your Mac
WinPlug brings back the taskbar, Alt-Tab, the Windows shortcuts, the snipping tool and more, in one app.
Free for 14 days · $24 one-time · No account
Other Windows habits WinPlug brings back
- Ctrl+Alt+Delete opens Activity Monitor. See how to Ctrl+Alt+Delete on a Mac.
- Alt alone opens the menus with a letter, like on Windows. See where the Alt key is on a Mac.
- Alt+Tab shows every open window with a thumbnail.
Frequently asked questions
What is Alt+F4 on a Mac?
Command+W closes the front window, and Command+Q quits the app. Alt+F4 itself does nothing on a Mac unless you install an app such as WinPlug, which makes it close the front window.
How do I close a window on a Mac with the keyboard?
Press Command+W. To close every window of the app at once, press Option+Command+W. In a web browser, Command+W closes the current tab.
How do I quit an app on a Mac?
Press Command+Q, or choose Quit from the menu that has the app’s name, next to the Apple menu. You can also Control-click the app’s icon in the Dock and choose Quit.
Why does the app stay open after I close its window?
On a Mac, a window and its app are separate: many apps keep running with no window open, so you can open a new one quickly. A dot under the app’s icon in the Dock shows it’s still open. Press Command+Q to quit it.
What does the F4 key do on a Mac?
On Mac keyboards, the top row controls Mac features by default, so F4 runs the feature printed on it. To use it as a real F4, hold Fn (or the globe key) while you press it, or turn on “Use F1, F2, etc. keys as standard function keys” in System Settings > Keyboard.
Sources
- Apple Support, “Mac keyboard shortcuts”, support.apple.com/en-us/102650 (checked October 2026).
- Apple Support, “How to use the function keys on your Mac”, support.apple.com/en-us/102439 (checked October 2026).
- Apple Support, “How to force an app to quit on your Mac”, support.apple.com/en-us/102586 (checked October 2026).


