Create a menubar shortcut for an application

Hi all, I purchased Keyboard Maestro over a year ago and have dabbled with it here and there. I love the application's potential, but I have almost zero clue how to use it to maximize its capabilities, and I often feel that I've wasted my money. I've bought and watched tutorials on using it, but I still have no idea what I'm doing, and it's frustrating.

I want to add a keyboard shortcut to enable/disable the "Network Filter" for the menubar application Little Snitch, but I'm unsure how. Especially since Little Snitch's menubar icon occasionally appears in different places.

I'd welcome any tips and suggestions on how to learn Keyboard Maestro better and create the shortcut I want.

Cheers

It seems you're not alone; here's a post from 2018 suggesting it's quite difficult to automate Little Snitch specifically.

No AppleScript dictionary, no command line utility, and the developer actively builds the UI to prevent an app like Keyboard Maestro from manipulating it. Unfortunately, I would assume this is still the case today.
*Update: see below

Hey Vito! Thanks for the reply. :grinning:

Let's say I wanted to try making a shortcut for another menubar application instead of Little Snitch. Any suggestions on how to go about doing that? What's the very best way to learn Keyboard Maestro?

Cheers!

I spoke too soon!

I dug around and it turns out Little Snitch 5 (released in 2020) provides a command line utility "due to popular demand".

You have to explicitly allow it in Little Snitch.app > Preferences > Security.

From there you can add this to an Execute a Shell Script action:
sudo littlesnitch write-preference networkFilterEnabled false
or to re-enable:
sudo littlesnitch write-preference networkFilterEnabled true

You will have to run it as root, which is tricky (and risky) but doable. See this discussion.

1 Like

See this graphic to distinguish between an App Menu and a Status Menu.

  • Interacting with an App Menu for an application can be done with the Select or Show a Menu Item action.

  • Peter has said previously that working with a Status Menu is tough because "there is no good way to identify them". I believe this is still the case, and the leading technique is still the Find Image on Screen action.

Ask 10 people and you may get 20 answers, but I recommend a learn-by-doing approach paired with the wiki and this forum.

Here's a short list of additional tutorials -- maybe a different style will click.

Good luck, and don't be afraid to come back with more questions!

1 Like

The best way to start using Keyboard Maestro is to start simple:

  • Read the Quick Start (Help menu)
  • Do the Tutorial (Help menu)
  • And then grow your macros organically, starting simple.
  • Ask on the forum for help with any macros you get stuck on.
  • Consider enrolling in David Spark’s Keyboard Maestro Field Guide.
1 Like