How to Stop ⌘Q from Accidentally Quitting Safari

One of the nicest Google Chrome features is the ability to prevent Command-Q from instantly quitting Chrome. With all of the open tabs (and the paused videos in them!) that so many of us accumulate, shutting down a browser by accident can be quite a frustrating moment. With the Chrome option “Warn before quitting” enabled, you will have to press and hold ⌘Q to initiate shutdown. (I’m deliberately using language that mirrors powering off an operating system, since a web browser is kind of a new operating system in many ways.)

Safari, to the best of my knowledge, has no such feature. But Apple hasn’t entirely left us out in the cold, either. Here’s how to prevent a quick or accidental bump of ⌘Q from instantly quitting Safari (as of April 18, 2018, running macOS High Sierra):

  1. Open System Preferences.
  2. Go to Keyboard and open the Shortcuts tab.
  3. In the left pane, select App Shortcuts.
  4. Use the new shortcut button, which looks like a plus sign (+), to create a new Safari-specific shortcut for the command “Quit Safari” (no quotes). I suggest ⌥⌘Q.

Here is how the form should be filled out:
Screen shot

This is what it should look like when you are done:
Screen shot

Now, pressing ⌘Q in Safari will have no effect. You can verify the change by opening the Safari menu in Safari and observing your new shortcut listed next to the Quit Safari command. If you chose the same replacement shortcut as I did, that should be listed as ⌥⌘Q.
Screen shot of open Safari menu showing modified command

Let me know if you enjoyed this tip!


April 18th, 2018
Alan Hogan (@alanhogan_com).  Contact · About