Universal Mute

@rebind / universal-mutev0.1.1Public

Mute and unmute Zoom, Microsoft Teams or Google Meet with one key from any window, then return to your work.

Files

Older release. Installs get 0.1.1.

main.luau1.0 KB

-- Universal Mute: find the meeting window, press that app's own mute
-- shortcut, and switch back to what you were doing.

local cfg = UI.Schema({
  hotkey = UI.Keybind("F9", { label = "Mute key" }),
})

-- each app's own mute shortcut, found by window title
local CALLS = {
  { title = "Zoom Meeting", win = "LAlt+A", mac = "LWin+LShift+A" },
  { title = "Microsoft Teams", win = "LCtrl+LShift+M", mac = "LWin+LShift+M" },
  { title = "Meet -", win = "LCtrl+D", mac = "LWin+D" },
}

local IS_MAC = _REBIND.platform == "macos"

Bind(
  cfg.hotkey,
  Async(function()
    local back = Window.GetForeground()
    for _, call in CALLS do
      local hw = Window.Find(call.title)
      if hw then
        Window.Activate(hw)
        Sleep(120)
        HID.Combo(if IS_MAC then call.mac else call.win)
        if back and back ~= hw then
          Sleep(60)
          Window.Activate(back)
        end
        return
      end
    end
    UI.Notify("No Zoom, Teams or Meet window found", "warning")
  end)
)

3 files, 2.7 KB.