Skip to content

Commit

Permalink
super keys for brackets and delete
Browse files Browse the repository at this point in the history
  • Loading branch information
caillou committed Mar 14, 2020
1 parent aa21c6c commit 8010699
Showing 1 changed file with 30 additions and 3 deletions.
33 changes: 30 additions & 3 deletions hammerspoon/super.lua
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,32 @@ local superDuperModeAppMappings = {
hs.eventtap.keyStroke({'control', 'option'}, 'v', 0)
end,
d = function (event)
-- Go to previous tab in most apps
hs.eventtap.keyStroke(modifiers(event), 'delete', 0)
-- (
hs.eventtap.keyStroke({'shift'}, '9', 0)
end,
f = function (event)
-- )
hs.eventtap.keyStroke({'shift'}, '0', 0)
end,
e = function (event)
-- {
hs.eventtap.keyStroke({'shift'}, '[', 0)
end,
r = function (event)
-- }
hs.eventtap.keyStroke({'shift'}, ']', 0)
end,
x = function (event)
--
hs.eventtap.keyStroke({}, '[', 0)
end,
c = function (event)
--
hs.eventtap.keyStroke({}, ']', 0)
end,
h = function (event)
--
hs.eventtap.keyStroke({}, 'delete', 0)
end,
}

Expand Down Expand Up @@ -193,7 +217,10 @@ superDuperModeNavigationTraining = eventtap.new({ eventTypes.keyDown }, function

local keycode = event:getKeyCode()

if keycode <= 126 and keycode >= 123 then -- the arrow keys
local isDelete = keycode == 51
local isArrow = keycode <= 126 and keycode >= 123

if isArrow or isDelete then -- the arrow keys
hs.alert.show("Nope!")
return true
end
Expand Down

0 comments on commit 8010699

Please sign in to comment.