How to Toggle Mute Your Mic on macOS (with a keyboard shortcut!)


How can we toggle mute our microphone on a computer running macOS?

I often want to appear unmuted in Zoom meetings, but I still want my microphone to be muted.

Ideally, I can mute and unmute my microphone without anyone on the call knowing.

There are microphones that have dedicated mute buttons. However, if we’re using a built-in microphone or an external microphone without a mute button, we’ll need a custom solution to toggle-mute our microphone.

We’ll be working in the following applications/settings on our Mac:

  • Automator
  • Security & Privacy settings
  • Keyboard settings

Then, we’ll be in Sound settings to test everything at the end.

1. Create Quick Action in Automator

We’ll be using Quick Actions in Automator to run a script that will toggle-mute our microphone.

Open Automator

Let’s start by opening the Automator application.

  1. Open Spotlight: ⌘ + spacebar
  2. Search: Automator

Create a new Quick Action

The menu bar (top-left of screen) should now say Automator.

  1. Select in menu bar: FileNew
  2. Double click Quick Action, or select it and click Choose

Configure AppleScript

Let’s configure the script to toggle our microphone.

There will be a collection of dropdown inputs in the Quick Action wizard

  1. Update first dropdown input: Automatic (text)no input
    1. Workflow receives [no input] in [any application]
  2. Search for Run AppleScript in the Name search bar
  3. Double click Run AppleScript
  4. Replace default script with the script below
on getMicrophoneVolume()
	input volume of (get volume settings)
end getMicrophoneVolume
on disableMicrophone()
	set volume input volume 0
	display notification "Volume set to 0" with title "Microphone OFF ❌" sound name "Submarine"
end disableMicrophone
on enableMicrophone()
	set volume input volume 100
	display notification "Volume set to 100" with title "Microphone ON ✅" sound name "Ping"
end enableMicrophone
if getMicrophoneVolume() < 5 then
	enableMicrophone()
else
	disableMicrophone()
end if

Normally, we would check if getMicrophoneVolume() = 0. However, I noticed that when disableMicrophone() is called during a Zoom meeting, the volume gets set really low but not quite muted. That is why we check if getMicrophoneVolume() < 5.

If you don’t plan on using this script with Zoom, you can simply check if getMicrophoneVolume() = 0.

Save Quick Action

Let’s save our Quick Action.

  1. Go to FileSave or press ⌘ + S
  2. Name: Toggle Microphone, or whatever you want
  3. Click Save

2. Grant permissions to Automator

Let’s grant Automator the permission run actions.

Open Security & Privacy settings

Let’s open the Security & Privacy settings.

  1. Open Spotlight: ⌘ + spacebar
  2. Search: Security & Privacy

Update permissions

Then, we can allow Automator to control our computer.

  1. Under the Privacy tab, select Accessibility
  2. Click the bottom-right lock: Click the lock to make changes
  3. Click the plus + to add an application
  4. In Finder, navigate to Applications
  5. Double click Automator, or select it and click Open
  6. Ensure Automator is checked in the Security & Privacy panel
  7. Click the bottom-right lock: Click the lock to prevent further changes

3. Add keyboard shortcut

Ensure that the keyboard shortcut used does not coincide with any of your commonly-used shortcuts. This is a global binding that may override app-level shortcuts.

Open Keyboard settings

Let’s open the Keyboard settings.

  1. Open Spotlight: ⌘ + spacebar
  2. Search: Keyboard

Add shortcut for AppleScript

This shortcut will trigger a run of our script.

  1. Go to the Shortcuts tab
  2. Click on Services
  3. Under General, select your Quick Action name (e.g. Toggle Microphone)
  4. Click Add Shortcut
  5. Press your shortcut (e.g. ⌃\ or Shift + ⌘ + F11)

4. Verify that the Quick Action works

Let’s test that the keyboard shortcut and script functions as expected.

Open Sound settings

Let’s open the Sound settings.

  1. Open Spotlight: ⌘ + spacebar
  2. Search for Sound: Sound
  3. Go to the Input tab

Test mute toggle works

The moment of truth…

  1. Ensure Input level responds when you speak
  2. Press your keyboard shortcut
  3. Verify that 2 things happen:
    1. The Input volume is set to 0
    2. You get a notification saying Microphone OFF
  4. Press your keyboard shortcut again
  5. Verify that 2 things happen:
    1. The Input volume is set to 100
    2. You get a notification saying Microphone ON