After updating to macOS Mojave (10.14), I could no longer get hammerspoon to execute key-binds that access mission control
hs.eventtap.keyStroke({"ctrl"}, "up")
or switch desktops
hs.eventtap.keyStroke({"ctrl"}, "left")
hs.eventtap.keyStroke({"ctrl"}, "right")
These commands worked fine in Yosemite, Sierra and High Sierra.
Not working here either. Doh! Any ideas @cmsj or @asmagill ?
I got this same error both on Keyboard Maestro and Hammerspoon, use applescript fix temporarily:
hs.osascript.applescript("tell application \"System Events\" to key code 123 using control down")
Nice workaround @Voleking !
FYI: I tried all the steps listed here with Hammerspoon, but none of them seemed to work sadly.
I also tried giving Hammerspoon "Full Disk Access", but no luck.
Possibly related? https://stackoverflow.com/a/52386903/6925202
I wonder if the only solution is to re-write hs.eventtap - as I know this is something @asmagill has talked about for a while (#1161)?
Hyper's window summon extension doesn't like this, either. I set Hyper to react to F18, which has stopped working after switching to Mojave. This is my Hammerspoon line:
hs.eventtap.keyStroke({}, 'F18')
Haven't had the issue. Does adding a 0 delay fix?
hs.eventtap.keyStroke({"ctrl"},dir,0)
Try adding "fn" as a modifier. hs.eventtap.keyStroke({"fn", "cmd"},"left",100) works where hs.eventtap.keyStroke({"cmd"},"left",100) doesn't.
Most helpful comment
Try adding
"fn"as a modifier.hs.eventtap.keyStroke({"fn", "cmd"},"left",100)works wherehs.eventtap.keyStroke({"cmd"},"left",100)doesn't.