Created
May 21, 2021 20:16
-
-
Save DavidMikeSimon/89cbf58d8a3e3646488903fc1fe1c2c1 to your computer and use it in GitHub Desktop.
Hammerspoon zoom config
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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