Changing Quit-Safari Shortcut

How to avoid accidentally quitting Safari on Mac

3 minute read

If you are like me, the tabs situation in the browser gets out of hand quickly once the laptop has been running for more than two days. I am not sure if those articles named "7 Things That Surprised The Scientist" or "10 Things You Would Not Believe That Exists!" are really something one should be reading about?

Well, let's hold our judgement. The reasons for opening so many tabs are whole another topic, so I will focus on the inconvenience of having too many tabs open.

When you use the shortcut Command-W to close a tab, and your finger accidentally slips and click Q, the whole app quits! Leading to a 15 minutes rage about why these shortcuts, one benign and one dangerous, are so close together. And what if the those tabs you opened were in incognito mode? They are gone!

Some articles online suggest that there's no way to overwrite individual app's shortcuts, but it is not true. To remedy this, open System Preferences > Keyboard > Shortcuts. Under Shortcuts choose "App Shortcuts" and "+" sign to add a new shortcut.

A new modal will pop up, letting you to choose an Application, a Menu Title and a Keyboard Shortcut.

Use the following options:

Application: Safari
Menu Title: Quit Safari
Keyboard Shortcut: "What you wish for it to be"

Then macOS will overwrite the default Command-Q with your choice. If the specific menu name ever changes, you may have to do this once more in the future.