Skip to content

Instantly share code, notes, and snippets.

@monaye
Created December 11, 2018 16:07
Show Gist options
  • Select an option

  • Save monaye/dae06954a77f8ef8158cb82bb5b71a9e to your computer and use it in GitHub Desktop.

Select an option

Save monaye/dae06954a77f8ef8158cb82bb5b71a9e to your computer and use it in GitHub Desktop.
HammerSpoon Key Modifer
local function keyCode(key)
return function() hs.eventtap.keyStroke({}, key) end
end
hs.hotkey.bind({"ctrl"}, 'h', keyCode('left'), nil, keyCode('left'))
hs.hotkey.bind({"ctrl"}, 'j', keyCode('down'), nil, keyCode('down'))
hs.hotkey.bind({"ctrl"}, 'k', keyCode('up'), nil, keyCode('up'))
hs.hotkey.bind({"ctrl"}, 'l', keyCode('right'), nil, keyCode('right'))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment