Skip to content

Commit

Permalink
Avoid sending Escape if any other keys are pressed
Browse files Browse the repository at this point in the history
This allows rapid Ctrl-key combos without triggering a superfluous Esc.
  • Loading branch information
jasoncodes committed Oct 4, 2016
1 parent 708560c commit 8f88dae
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions hammerspoon/control_escape.lua
Expand Up @@ -32,3 +32,11 @@ end

control_tap = hs.eventtap.new({12}, control_handler)
control_tap:start()

other_handler = function(evt)
ctrl_table["send_escape"] = false
return false
end

other_tap = hs.eventtap.new({hs.eventtap.event.types.keyDown}, other_handler)
other_tap:start()

0 comments on commit 8f88dae

Please sign in to comment.