Skip to content

Instantly share code, notes, and snippets.

@dustinlacewell-wk
Last active August 30, 2017 05:54
Show Gist options
  • Save dustinlacewell-wk/86c2c3a22a9a20d9e29d06aa71b2e86d to your computer and use it in GitHub Desktop.
Save dustinlacewell-wk/86c2c3a22a9a20d9e29d06aa71b2e86d to your computer and use it in GitHub Desktop.
-- 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