macOS: Universally Mute teams mic with keyboard
Gyandeep Singh

Gyandeep Singh @gyandeeps

About: Staff Software Engineer (@Hinge Health) Web, JavaScript, NodeJs, automation, being human, Dad, communication s key 😎 #StriveForGreatness

Location:
Kansas City
Joined:
Jul 2, 2017

macOS: Universally Mute teams mic with keyboard

Publish Date: Oct 26 '21
8 1

Issue

A lot of folks are tired of managing microphone mute/unmute when on teams calls. Since you have to go to teams call and than use a keyboard or hit the microphone icon. That a distraction if you are doing multitasking (which almost everyone is doing).

Solution

Use a universal keyboard shortcut to mute/unmute microphone in teams without going to teams app. Here how we do it:

Step 1

  • Open up Automator app on your macOS
    • Keyboard shortcut: CMD + Space and than search for Automator
  • Hot quick action document
  • Hit Choose

Step 2

Let design the automation so that we can run it using a keyboard shortcut.

  • Change the Workflow receive current option to no input
  • Leave everything else to its default.
  • On the left panel, look for the action Run Applescript
    • Double click on it so it moves to the right on your new action panel
  • Replace the code in it with the below code
on run {input, parameters}

    tell application "Microsoft Teams"
        activate
        tell application "System Events"
            keystroke "m" using {shift down, command down}
        end tell
    end tell

    return input
end run
Enter fullscreen mode Exit fullscreen mode
  • Go to file on the top-left menu and hit save.
  • Give it some name (example teams-mute)

Step 3

Let's get to the keyboard shortcut

  • Go to System preferences -> keyboard -> shortcuts
  • Click services in the left panel and scroll down to look for your service. It should be under the general section.
  • Assign a shortcut to it.
    • I used F1

Troubleshooting

  • When you execute the shortcut it might ask you for permission to change the system.
    • Provide that permission in System preferences -> security and privacy
    • select Accessibility in left panel and make sure Automator is present and select in the right right panel.
  • If your action is not working than go to Accessibility (as mentioned in previous step) section and remove Automator and than add it back again using the +/- buttons

Hope this helps and share your thoughts.

Comments 1 total

  • Rancu Marius
    Rancu MariusMay 5, 2022

    It takes like ~2 seconds for the mute/unmute action to complete :(

Add comment