(waiting for deletion)
I've added my own hammerspoon config file, that add nested loops over the cursor directions. Also works for Colemak: https://github.com/braydenm...
I made a few minor changes to Brett's init.lua to make it work for me as I was used to. Change the keysiusewithhyper array to your own list of keys that you use with Hyper/Capslock. This is my complete init.lua file:
-- A global variable for the Hyper Mode
k = hs.hotkey.modal.new({}, "F17")
-- Trigger existing hyper key shortcuts
keysiusewithhyper = {'left', 'right', 'up', 'down', '1', '2', '3', 'a', 's', 'd', 'w', 'x', 'd'}
for i,v in ipairs(keysiusewithhyper) do
k:bind({}, v, nil, function() hs.eventtap.keyStroke({"cmd","alt","shift","ctrl"}, v); k.triggered = true end)
end
-- Enter Hyper Mode when F18 (Hyper/Capslock) is pressed
pressedF18 = function()
k.triggered = false
k:enter()
end
-- Leave Hyper Mode when F18 (Hyper/Capslock) is pressed,
-- send ESCAPE if no other keys are pressed.
releasedF18 = function()
k:exit()
if not k.triggered then
hs.eventtap.keyStroke({}, 'ESCAPE')
end
end
-- Bind the Hyper key
f18 = hs.hotkey.bind({}, 'F18', pressedF18, releasedF18)
with the existing karabiner.json file:
{
"profiles": [
{
"name": "Default profile",
"selected": true,
"simple_modifications": {
"caps_lock": "f18"
}
}
]
}
I made a small change to Brett's init.lua to make it work for me as I was used to. Change the keysiusewithhyper array to your own list of keys that you use with Hyper/Capslock. This is my complete init.lua file:
-- A global variable for the Hyper Mode
k = hs.hotkey.modal.new({}, "F17")
-- Trigger existing hyper key shortcuts
keysiusewithhyper = {'left', 'right', 'up', 'down', '1', '2', '3', 'a', 's', 'd', 'w', 'x', 'd'}
for i,v in ipairs(keysiusewithhyper) do
k:bind({}, v, nil, function() hs.eventtap.keyStroke({"cmd","alt","shift","ctrl"}, v) end)
end
-- Enter Hyper Mode when F18 (Hyper/Capslock) is pressed
pressedF18 = function()
k.triggered = false
k:enter()
end
-- Leave Hyper Mode when F18 (Hyper/Capslock) is pressed,
-- send ESCAPE if no other keys are pressed.
releasedF18 = function()
k:exit()
if not k.triggered then
hs.eventtap.keyStroke({}, 'ESCAPE')
end
end
-- Bind the Hyper key
f18 = hs.hotkey.bind({}, 'F18', pressedF18, releasedF18)
with the existing karabiner.json file:
{
"profiles": [
{
"name": "Default profile",
"selected": true,
"simple_modifications": {
"caps_lock": "f18"
}
}
]
}
Wait, I followed the instructions, and the previous tutorial, pre-Sierra, and this isn't working. Does this not give you the Hyperkey that in any "Set Your Shortcut Window" system-wise, would emulate pressing ctrl+alt+shift+command? I installed the software and placed the files in their respective folders, and nothing is happening.
Anyone have this working on the 10.12.1 beta of Sierra? Wondering if it's me doing something wrong, or the beta. I feel like everything is set based on the tutorial from Matt Perry + here, but Caps Lock fails to actually do anything.
It's working for me after a system restart on 10.12.1 (non beta).
Does this simulate ctrl+alt+shift+command? I've did the above but my current shortcuts are not working.