Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 3e928dd

Browse files
raineorshineadamyonk
authored andcommittedMar 8, 2017
Fix shift key in (S)uper (D)uper Mode.
1 parent de15da2 commit 3e928dd

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed
 

‎hammerspoon/microphone.lua

+7-7
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ display_status = function ()
1616
end
1717
display_status()
1818

19-
toggle = function (input)
20-
if input:muted() then
21-
input:setMuted(false)
19+
toggle = function (device)
20+
if device:muted() then
21+
device:setMuted(false)
2222
else
23-
input:setMuted(true)
23+
device:setMuted(true)
2424
end
2525
end
2626

@@ -31,12 +31,12 @@ end
3131
control_key_timer = hs.timer.delayed.new(0.3, control_key_handler)
3232

3333
option_handler = function(event)
34-
local input = hs.audiodevice.current(true).device
34+
local device = hs.audiodevice.current(true).device
3535
local new_mods = event:getFlags()
3636

3737
-- alt keyDown
3838
if new_mods['alt'] == true then
39-
toggle(input)
39+
toggle(device)
4040
if recently_clicked == true then
4141
display_status()
4242
second_click = true
@@ -49,7 +49,7 @@ option_handler = function(event)
4949
if second_click then
5050
second_click = false
5151
else
52-
toggle(input)
52+
toggle(device)
5353
end
5454
end
5555

0 commit comments

Comments
 (0)
Please sign in to comment.