Skip to content

Instantly share code, notes, and snippets.

@DavidMikeSimon
Created May 21, 2021 20:16
Show Gist options
  • Select an option

  • Save DavidMikeSimon/89cbf58d8a3e3646488903fc1fe1c2c1 to your computer and use it in GitHub Desktop.

Select an option

Save DavidMikeSimon/89cbf58d8a3e3646488903fc1fe1c2c1 to your computer and use it in GitHub Desktop.
Hammerspoon zoom config
function withZoomApp(fun)
local app = hs.application.get("zoom.us")
if (app ~= nil) then
fun(app)
end
end
function pttDown()
withZoomApp(function(app)
hs.eventtap.event.newKeyEvent("space", true):post(app)
end)
end
function pttUp()
withZoomApp(function(app)
hs.eventtap.event.newKeyEvent("space", false):post(app)
end)
end
function disconnect()
withZoomApp(function(app)
return app:selectMenuItem({"zoom.us", "Quit Zoom"})
end)
end
hs.hotkey.bind('', 'padenter', pttDown, pttUp)
hs.hotkey.bind('', 'pad1', disconnect)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment