I want to use hammerspoon to replicate Windows' language switching using Alt
and Shift
. For this I want to add a hotkey bind for command
and shift
, but all my attempts fail.
I tried:
hs.hotkey.bind({"cmd", "shift"}, "", function()
performAction()
end)
and
hs.hotkey.bind({"cmd"}, "shift", function()
performAction()
end)
But nothing works.
philsnow's answer gave me most of the building blocks I needed, here's the code I used to map
cmd
->cmd + shift
->shift
->nothing
to switch between languages like in Windows. For anyone needing something similar, this code worked for me to switch toggle languages.