> ## Content Index
> Fetch the complete content index at: https://birchtree.me/llms.txt
> Use this file to discover other available public pages before exploring further.

# Adding a Safari Quit Confirmation with Keyboard Maestro
- URL: https://birchtree.me/blog/adding-a-safari-quit-confirmation-with-keyboard-maestro/
- Published: 2020-01-14T17:20:00.000Z
- Updated: 2020-01-14T18:42:40.000Z
- Author: Matt Birchler
- Tags: #Import 2023-06-01 22:41, #Import 2025-03-29 19:29

[John Gruber wrote this simple, but useful AppleScript](https://daringfireball.net/2020/01/quit%5Fconfirmation%5Ffor%5Fsafari%5Fon%5Fmacos?ref=birchtree.me) 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](https://daringfireball.net/2020/01/quit%5Fconfirmation%5Ffor%5Fsafari%5Fon%5Fmacos?ref=birchtree.me).

**Two:** Make a new Group in Keyboard Maestro that only activates when inside Safari.

![](https://storage.ghost.io/c/25/31/25312b2a-2d5b-4d01-ba92-e6755efc202c/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://storage.ghost.io/c/25/31/25312b2a-2d5b-4d01-ba92-e6755efc202c/content/images/2020/01/image-2.png)

Now when you hit Cmd+Q in Safari, it will make you confirm the action. Done!