Created
July 18, 2021 08:17
-
-
Save capjamesg/e7f27684170b9a4ed19bc0e3aa9141b2 to your computer and use it in GitHub Desktop.
Some of my Keybow macros.
This file contains 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
require "keybow" | |
muted = false | |
-- this code lets me press multiple keys at once (use a keyboard shortcut) | |
-- I found the modifier function online but cannot remember the source | |
function modifier(key, ...) | |
for i = 1, select('#', ...) do | |
local j = select(i, ...) | |
keybow.set_modifier(j, keybow.KEY_DOWN) | |
end | |
keybow.tap_key(key) | |
for i = 1, select('#', ...) do | |
local j = select(i, ...) | |
keybow.set_modifier(j, keybow.KEY_UP) | |
end | |
end | |
-- end zoom meeting | |
function handle_key_00(pressed) | |
if pressed then | |
modifier("q", keybow.LEFT_ALT) | |
reset_keys() | |
keybow.tap_enter() | |
end | |
end | |
-- mute zoom meeting | |
function handle_key_01(pressed) | |
if pressed then | |
modifier("a", keybow.LEFT_ALT) | |
if muted == false then | |
for i=0,11 do | |
keybow.set_pixel(i, 255, 0, 0) | |
end | |
muted = true | |
else | |
for i=0,11 do | |
keybow.set_pixel(i, 0, 255, 0) | |
end | |
muted = false | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment