I Broke All Safari Actions and Need Help

While trying to solve a related issue I broke all the Safari actions in KM. KM can't control or do anything with Safari any more. Can someone please help me restore them? I'm not sure what command to use in Terminal or somewhere else I might need to change a KM setting.

In troubleshooting another issue I issued the following Terminal commands one at a time (with an Enter between)

defaults write com.stairways.keyboardmaestro.engine AppleScriptSafariBundleID -string "com.apple.SafariTechnologyPreview"
defaults write com.stairways.keyboardmaestro.engine BrowserSafariName -string "Safari Tech"
defaults write com.stairways.keyboardmaestro.engine AppleScriptSafariName -string "com.apple.Safari"

The result of which was:

  • All Safari actions in existing macros then said they were "Safari Tech" actions and lacked a Safari icon
  • Those actions no longer worked at all

Those commands came from manual:Single Page Version [Keyboard Maestro Wiki]

Realizing the wiki line called it "Safari Tech", I then sent through Terminal this:

defaults write com.stairways.keyboardmaestro.engine BrowserSafariName -string "Safari"
defaults write com.stairways.keyboardmaestro.engine AppleScriptSafariName -string "com.apple.Safari"


  • Safari actions now say "Safari" but still lack a Safari icon
  • Those now-Safari actions still don't work
  • None of the Safari actions in the Actions List has a Safari icon (see screenshot)
  • Creating a new macro and adding a Safari action (new window) doesn't work (see attached macro and screenshot)

In between each operation I quit and relaunched KM Engine and KM Editor.

TEST Safari New Window.kmmacros (1.8 KB)

Here is the XML (via Edit > Copy as XML} of the macro I just included. I don't see anything wrong or why it should not be launching Safari (which, by the way, does work just fine when used outside of a KM macro). The macro/action fails on Run and Try after quitting and restarting KMEditor, KMEngine, and the entire computer.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">

Keyboard Maestro v 11.0.3
macOS 13.6.7

As a test, you could disable the KM engine, quit the editor, and them move all the KM settings files out of the ~/Library/Preferences folder:


Don't delete them, just move them elsewhere. You might then have to logout/login to clear cache; after doing so, relaunch KM and it should have fresh settings but with all of your macros intact. Do things work as expected then?


Delete the preferences and restart Keyboard Maestro Engine and Keyboard Maestro.

defaults delete com.stairways.keyboardmaestro.engine AppleScriptSafariBundleID
defaults delete com.stairways.keyboardmaestro.engine BrowserSafariName 
defaults delete com.stairways.keyboardmaestro.engine AppleScriptSafariName 
defaults delete com.stairways.keyboardmaestro.engine AppleScriptGoogleChromeBundleID
defaults delete com.stairways.keyboardmaestro.engine BrowserGoogleChromeName 
defaults delete com.stairways.keyboardmaestro.engine AppleScriptGoogleChromeName 

Thank you.

1 Like