Skip to content

Instantly share code, notes, and snippets.

@andialles
Created November 14, 2016 10:04
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andialles/2828c90d12383d9e02336d77ae9738df to your computer and use it in GitHub Desktop.
Save andialles/2828c90d12383d9e02336d77ae9738df to your computer and use it in GitHub Desktop.
Neo2 Ebene 4 Hammerspoon config
myModifierMode = hs.hotkey.modal.new()
-- zusätzlich muss karabiner-elements die grave/accenttaste auf f18 remappen!
movements = {
{ 'i', {}, 'LEFT'},
{ 'a', {}, 'DOWN'},
{ 'l', {}, 'UP'},
{ 'e', {}, 'RIGHT'},
{ 'v', {}, 'delete'},
{ 'c', {}, 'forwarddelete'},
{ 'u', {'cmd'}, 'LEFT'}, -- beginning of line
{ 'o', {'cmd'}, 'RIGHT'}, -- end of line
{ 'x', {}, 'pageup'},
{ 'w', {}, 'pagedown'},
{ 'm', {}, '1'},
{ ',', {}, '2'},
{ '.', {}, '3'},
{ 'n', {}, '4'},
{ 'r', {}, '5'},
{ 't', {}, '6'},
{ 'h', {}, '7'},
{ 'g', {}, '8'},
{ 'f', {}, '9'},
{ 'space', {}, '0'}
}
for i,bnd in ipairs(movements) do
myModifierMode:bind({}, bnd[1],
function()
hs.eventtap.keyStroke(bnd[2], bnd[3])
end
)
end
myModifier = hs.hotkey.bind({}, 79,
function()
myModifierMode:enter()
end,
function()
myModifierMode:exit()
end
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment