How to Alt+F4 on a Mac?A New Mac User

I just bought a new Mac recently, and I am searching for an alternative to Alt + F4 shortcuts on Mac.
I know how to close the windows by clicking the red X button in the top left corner, how about only using the keyboard?
Or are there other useful shortcuts on Mac?
Thanks in advance.

Hi, switching from Windows to macOS can be a bit of an adjustment, especially when it comes to keyboard shortcuts.
The shortcuts on Windows Alt+F4 can close the active window.
However, Mac keyboards and operating systems operate differently, requiring you to learn a new set of commands to achieve the same results.
You can learn how to Alt F4 on Mac with:

  1. Command + W
  2. Command + Q

Yeah, just as the FourLeafClover says:
Command + W and Command + Q can help you to do Alt + F4 on Windows:
And you should know there are some differences between them:

  • Command + W: This shortcut closes the active window or tab within an application. For instance, if you’re working on multiple documents in Microsoft Word or have several tabs open in Safari, pressing Command + W will close the current document or tab. It’s a convenient way to tidy up your workspace without exiting the entire application.
  • Command + Q: While Command + W closes individual windows, Command + Q quits the entire application. This is equivalent to Windows using Alt+F4. If you want to completely shut down an app and free up system resources, Command + Q is the way to go.

Alt F4 on Mac? Command + W is best for closing windows you no longer need, while Command + Q is ideal for quitting applications on Mac entirely.
I think you can know these keyboard shortcuts in the later use:

  • Command + Option + Esc: This shortcut brings up the Force Quit Applications window, allowing you to forcefully close unresponsive applications. It’s similar to the Ctrl + Alt + Delete function on Windows, offering a quick way to regain control if an app freezes.
  • Command + H: This shortcut hides the active application without closing it. The app will continue running in the background, and you can bring it back by clicking its icon in the Dock.
  • Command + Tab: This is the Mac equivalent of Alt + Tab on Windows. It allows you to quickly switch between open applications, making multitasking smoother and more efficient.
    Hope you can enjoy the usage on macOS~

Don’t worry, you can learn a lot about Mac keyboard shortcuts here.

Okay, thanks for your help.

Helpful summary! I’ll try.