Last active
August 30, 2017 05:54
-
-
Save dustinlacewell-wk/86c2c3a22a9a20d9e29d06aa71b2e86d to your computer and use it in GitHub Desktop.
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
-- Hyper Hotkey Modal | |
modal = hs.hotkey.modal.new({}, nil) | |
-- Hyper Modal Handling | |
modalEntered = function() | |
modal.triggered = false | |
modal:enter() | |
end | |
modalExited = function() | |
modal:exit() | |
if not modal.triggered then | |
hs.eventtap.keyStroke({}, 'ESCAPE') | |
else | |
modal.triggered = false | |
end | |
end | |
-- Hyper Keybinding | |
f18 = hs.hotkey.bind({}, 'F18', modalEntered, modalExited) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment