← All articles

Alt-F4 on Mac: the shortcut that closes, the one that quits, and why there are two

You press Alt-F4 out of pure muscle memory, and nothing closes — or, on a Mac keyboard, Spotlight or Launchpad pops open instead. There is no Alt-F4 on Mac, because macOS splits what that one shortcut does on Windows into two separate commands: ⌘W closes the window, ⌘Q quits the app. Once you know which one you meant, the Mac version is actually faster. This guide covers both, the desktop "shut down" half of Alt-F4, and what to do when an app is frozen.

The Alt-F4 Mac equivalent, in one table

On Windows, Alt-F4 closes the active window, and when that's an app's last window, the app exits with it. With no window focused, it opens the Shut Down dialog. Here's where each of those jobs lives on a Mac:

What Alt-F4 does on WindowsMac shortcutNotes
Close the active window⌘WCloses the front window or tab; the app keeps running
Close the app⌘QQuits the app and all its windows
Close every window of an app⌥⌘WOption-Command-W; the app keeps running
Shut down (Alt-F4 on the desktop)Apple menu → Shut Down…Keyboard routes below
Kill a frozen app⌥⌘escOpens the Force Quit window

If you're using a Windows keyboard on your Mac, the Alt key is Option and the Windows key is Command — so the ⌘Q you want is Windows-key + Q on that keyboard. Our guide to using a Windows keyboard on a Mac translates the rest.

Command-W vs Command-Q: which one you actually meant

Most people who search for Alt-F4 on a Mac want one of two things, and it's worth deciding which before your fingers do:

  • "I'm done with this document / page / folder." That's ⌘W. In a browser it closes the current tab, not the whole window — press it again on the last tab and the window goes. Finder windows, documents in Pages or Preview and settings panes all close the same way.
  • "I'm done with this app." That's ⌘Q. Every window closes, the app stops using memory, and its icon drops out of the ⌘⇥ switcher. If you have unsaved work, the app asks first.

The habit that trips up Windows switchers is pressing ⌘W on the last window and expecting the app to go away. It usually won't.

Why the app is still running after you close the window

On a Mac, apps and windows are separate things. Close the last Safari window and Safari is still open: its menu bar is still at the top of the screen, its Dock icon still has the small dot under it, and it still shows up in ⌘⇥. That's deliberate — the app is ready the instant you want a new window, with no relaunch.

It isn't a leak, and on modern Macs a running app with no windows costs very little. But if an empty app in your switcher bothers you, quit it with ⌘Q instead of closing its windows one by one. A few single-window utilities, such as System Settings, do quit when you close their window — the exception, not the rule.

Avoiding the accidental Command-Q

⌘Q sits right next to ⌘W, and quitting a browser with thirty tabs when you meant to close one is a rite of passage. Two fixes:

  • Chrome has Warn Before Quitting (⌘Q) in its Chrome menu. Turn it on and you have to hold the shortcut, not tap it.
  • Get the window back if you slip. Most browsers reopen your last session from the History menu, and in many apps ⇧⌘T reopens the last closed tab or window.

The other half of Alt-F4: shutting down from the keyboard

Alt-F4 on an empty Windows desktop brings up Shut Down. The Mac has a few keyboard routes instead, per Apple's own shortcut list:

  • ⌃⌥⌘ + power button — quit all apps, then shut down. You're asked to save anything unsaved.
  • ⌃ + power button — on built-in keyboards without Touch ID, shows a dialog asking whether to restart, sleep or shut down. That's the closest thing to the Windows dialog.
  • ⌃⌘Q — lock the screen, the Windows-key + L equivalent.
  • ⇧⌘Q — log out, with a confirmation.

If none of those suit your keyboard, the Apple menu is always one click away, and from the keyboard you can reach it with menu bar keyboard navigation.

When Command-Q does nothing: force quit

A frozen app ignores ⌘Q, which is when Windows users reach for Ctrl-Alt-Delete. The Mac version is ⌥⌘esc: pick the app in the Force Quit window and confirm. Unsaved changes in that app are lost. For the full escalation — Activity Monitor, Terminal, and what to do when even the pointer is stuck — see Task Manager on Mac.

Can you make Alt-F4 work on a Mac?

You can, but it's usually not worth it. System Settings → Keyboard → Keyboard Shortcuts… → App Shortcuts lets you assign a new shortcut to any menu item by its exact name — but the close command is called "Close Window" in some apps and "Close" in others, and the quit command includes the app's name ("Quit Safari"), so one global rule won't catch them all. Key remappers like Karabiner-Elements can turn Option-F4 into ⌘W everywhere, and if you live in both operating systems every day, that can be worth the setup. For everyone else, ⌘W and ⌘Q are one hand, no stretch — learning them takes about a day.

Closing windows to find the one you want

A lot of Alt-F4 on Windows isn't about finishing with something — it's clearing the way, because Alt-Tab shows every window and closing a few makes the list shorter. On a Mac the urge is stronger, because ⌘⇥ only switches apps: the window you need is buried behind three others from the same app, so you start closing things.

If that's why you miss Alt-F4, the fix is a better switcher rather than fewer windows. Let's Switch brings the Windows model back: hold ⌥⇥ and flip through a live preview of every open window, most recent first, across apps and monitors. The switcher is free; Pro is a one-time purchase. Our Alt-Tab on Mac guide compares the options, and How to close all windows on a Mac covers the times you really do want a clean slate.

Frequently asked questions

What is Alt-F4 on a MacBook?

There's no single equivalent. Use ⌘W to close the current window or tab, and ⌘Q to quit the app entirely. On a MacBook, the Alt key is labelled Option.

Does Command-Q work in games?

Usually, yes — most Mac games quit with ⌘Q, though some full-screen games capture the keyboard and only quit from their own menu. If a game hangs, use ⌥⌘esc.

Is closing a window the same as quitting on a Mac?

No. Closing a window leaves the app running in the background, ready for a new window; quitting stops it. Look for the dot under the Dock icon to see which apps are still running.

Why does Option-F4 change my brightness or open something?

On Apple keyboards the top row is a set of system keys by default — F4 is Spotlight or Launchpad depending on the model — so pressing it with Option reaches that system feature, not a window command. macOS doesn't assign a close command to Option-F4 at all.