New Mac; All Brave Browser actions now using Safari...?

All the actions that previously interacted with Brave are now using Safari. I'm sure I must have been down this road but I can't think what I've missed.

I've done the usual:

defaults write com.stairways.keyboardmaestro.engine AppleScriptGoogleChromeBundleID -string "com.brave.Browser"
defaults write com.stairways.keyboardmaestro.engine BrowserGoogleChromeName -string "Brave Browser"

Can anyone point me in the right direction?

You have restarted KM completely?

Are %FrontBrowser...% tokens affected, or only %Chrome…% tokens?

Yeah, it's a new installation and I've restarted the machine a few times since setting up KM. It's not the tokens but the actions that are the issue. Instead of, for example Set Brave URL, an action will now say Set Safari URL, with the Safari icon instead of Brave's. Not sure how to revert them back to how they were.

Maybe you could directly edit (in for example BBEdit) ~/Library/Preferences/com.stairways.keyboardmaestro.engine.plist ?

Or just move the file out of Preferences and go from there.

1 Like

That sounds a bit nuclear and I'd prefer not to destroy my Safari actions. I'm sure this has happened to someone else, so I'll give it a day or so before I start messing around with the prefs. Thanks for the suggestion though.

Sorry to bother you, but @peternlewis?

Yes, editing is risky but I think moving the preferences file temporarily should be fine. Alternatively you could set up another account on your Mac to test from. But if you can wait for the authoritative answer that might indeed be best!

It's some kind of undocumented interaction between Keyboard Maestro and Brave (or something else), or just a bug in KM. It happened to me, too.

and

What worked for me was the following:

  1. I deleted all the browser preferences in KM per Peter Lewis's post:

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

  1. Then I ignored the accepted way to do it.
  2. I Created a macro called Primary Browser, set it to Activate Brave Browser.
  3. In macros, I first call that Activate Brave Browser macro.
  4. Then, the macros send all their commands to the Front Browser or directly to Brave, all manually changed from Default Application or Chrome-specific actions.

I've tried the approved way, replacing Chrome in preferences with Brave, a couple of times; it always ends in either or both KM ignoring the directive and sending to Chrome or Safari, or all browser commands failing.

2 Likes

Thanks for the really thoughtful response. I ended up going through and adjusting all the affected macros by hand. Didn't actually take that long. If it happens again, I'll refer back to your comment. :+1:t3:

2 Likes

Excellent! I'm glad it wasn't that tough a process for you.

1 Like