Adding a Safari Quit Confirmation with Keyboard Maestro
![Adding a Safari Quit Confirmation with Keyboard Maestro](/content/images/size/w2000/2020/01/Screenshot-2020-01-14-at-10.46.14-AM.png)
John Gruber wrote this simple, but useful AppleScript that warns you when quitting Safari if there are multiple tabs open. His post suggests how to implement this with FastScripts, but I wanted to use it with Keyboard Maestro, so here's how you do it:
One: Copy the script from the Daring Fireball post.
Two: Make a new Group in Keyboard Maestro that only activates when inside Safari.
![](https://birchtree.me/content/images/2020/01/image-1.png)
Three: Make a new Macro that activates on the keyboard shortcut “Cmd+Q”.
Now you should have something like this:
![](https://birchtree.me/content/images/2020/01/image-2.png)
Now when you hit Cmd+Q in Safari, it will make you confirm the action. Done!