Simple Zoom “Mute Audio” toggle, using Keyboard Maestro

The COVID-19 pandemic has done a great job of embarrassing countless workers when they forget to mute their microphones during a Zoom meeting. While Zoom does have a mappable keyboard shortcut to Mute/Unmute audio, for people like myself who are heavy users of keyboard shortcuts in their work applications, we often find that all available keyboard shortcut combos have been exhausted, and we have to resort to multi-key shortcuts that cant be easily invoked with one hand.

For keyboard shortcut obsessives like us, we use additional hardware devices such as the Elgato Streamdeck or P.I. Engineering X-Keys keyboards to give us additional physical buttons that can be used to trigger macros and other application commands. On the Mac, applications like Keyboard Maestro and ControllerMate unlock the power of these external input devices by allowing you to map very complicated automation workflows just by tapping a single key (and without having to memorize awkward keyboard shortcuts).

The problem with Zoom, however, is that the commands to Mute or Unmute Audio are not separate menu commands. They are in a menu “toggle” whose text label changes depending on the state of the menu item.


This makes it difficult to map the Mute/Unmute command to a single key, because by default, an app like Keyboard Maestro can’t trigger the actual menu item with a single key mapping, because the Menu label will change depending on the state of the command. Of course we could trigger this menu item using the keyboard shortcut, but this won’t work if another application is in the foreground that may have the same keyboard shortcut reserved for one of its own commands (which is why its better to trigger commands by addressing the actual Menu command items, as if you clicked on it yourself with the mouse, as it doesn’t depend on mapping a previous keyboard shortcut combo that you might want to use for something else). In that case, you have to switch to Zoom, then invoke the shortcut. In other words, amateur hour.

Thankfully there is a solution to this using Keyboard Maestro. A lot of KM users don’t realize that you can actually use Regular Expressions to match menu items, which allows you trigger menu items that may have dynamically changing labels, such as Zoom’s Mute/Unmute Audio command. Here’s the KM macro I use for this:

The “Menu Item” criteria uses a Regular Expression to filter on text label of the “Mute Audio” or “Unmute Audio” menu item, and triggers that item, regardless of which version of the label is currently displayed.

Just for good measure, I tell the macro to pop up a big, obnoxious temporary text overlay to remind me that I’ve muted or unmuted (you could also just use Notification Center to do this as well, which is less obnoxious).

I map this macro to a key on my X-Keys XK-60 keyboard, and no matter which app I am currently using in the foreground, if i need to mute or unmute my Zoom mic, I just have to tap that button, and it will do without having to switch back to the Zoom app!

Leave a Reply

Your email address will not be published.