Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save thepeopleseason/da275f076f01ac1248801b4e1af7dc89 to your computer and use it in GitHub Desktop.
Save thepeopleseason/da275f076f01ac1248801b4e1af7dc89 to your computer and use it in GitHub Desktop.
local rep = hs.hotkey.modal.new(hyper, 'a', "keyRepeat mode")
function rep:entered() keyRepeat = false end
rep:bind(nil, "escape", function() rep:exit() hs.alert'Exited keyRepeat mode' end)
rep:bind(nil,
"r",
function() hs.timer.doUntil(
function() return keyRepeat end,
function() hs.eventtap.keyStroke(nil, "x") end,
0.002)
end)
rep:bind(nil, 's', function() keyRepeat = true rep:exit() end)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment