Mic and Camera Zoom Hotkeys

October 10, 2020

I do many, many Zoom meetings every week, and once I built something to help me find and get into the right meeting quickly, I turned my attention to the in-meeting experience.

Zoom is rarely the focused window for me. I’m typically taking notes, but I both mute and unmute the microphone and turn the video camera on and off pretty regularly. Doing either requires me to switch focus to the Zoom window first.

A nice friction reducer here is to bind a “global” hotkey - one that works in any app to a small bit of code that activates the right menu items in the Zoom app.

Zoom Meeting Menu

Hammerspoon makes the basics pretty easy:

hyper:bind({}, 'm', nil, function() 
    local app = hs.application.get("us.zoom.xos")
    app:selectMenuItem("Mute Audio")

I ended up getting a little fancier as I wanted all the Zoom functions I use regularly under a single hotkey, including my favorite: a batch option which toggles video and audio together on and off.

Zoom Meeting Menu

Each set of actions is defined in JSON, so it is easy to customize and add more Zoom controls.

        "text": "Toggle Both Camera and Mic 🤫🙈",
        "subText": "",
        "toggleMenu1": "Mute Audio;Stop Video",
        "alertText1": "Muted and Stopped Cam",
        "toggleMenu2": "Unmute Audio;Start Video",
        "alertText2": "Camera and Mic are Live 🤩",
        "text": "Toggle Mute",
        "subText": "",
        "toggleMenu1": "Mute Audio",
        "alertText1": "Mic is Muted 😶",
        "toggleMenu2": "Unmute Audio",
        "alertText2": "Mic Live 🎉",
        "imageFile": "/.hammerspoon/images/mic.jpg"