- Open Automator.app
- Create new Quick Action
- Select Run AppleScript
- Add this:
set inputVolume to input volume of (get volume settings)
if inputVolume = 0 then
set inputVolume to 100
display notification "Volume set to 100" with title "✅ Microphone is on"
else
set inputVolume to 0
display notification "Volume set to 0" with title "❌ Microphone is off"
end if
set volume input volume inputVolume
- Save as
mute-microphone
- Go to System Preferences -> Keyboard -> Shortcuts -> Services -> General
- Find the
mute-microphone
service and set the hotkey (e.g. control-cmd-option M)
For individuals who have an issue of this not working on Monterey,
The simple modification is to compare the
inputVolume
to be< 10
In Monterey, apparently, the mic volume cannot be set to
0
lol, After someone sets it to 0, the OS makes it as4
for some unknown reason! Here is the modified version:P.S> THe script runs by itself, but even after enabling Automator in Security & Privacy as Accessibility, the keyboard shortcut does seem to trigger the same. Gotta solve this later