spacehammer
spacehammer copied to clipboard
Cannot emit backslash
This is [most likely] not a bug in Spacehammer. I'm struggling to pinpoint the cause of it.
Basically, I am unable to emit certain keys, specifically, backslash, i.e., the following:
(hs.eventtap.keyStroke nil "\\")
- doesn't work. Interestingly, the similar Lua code [when executed from hs IPC] works just fine:
hs.eventtap.keyStroke(nil, "\\")
Also, (hs.eventtap.keyStrokes "\\") works. But I needed to emit Ctrl+\. And hs.eventtap.keyStrokes doesn't allow modifiers.
I tried a bit more elaborate way:
(local {: for-each} (require :lib.functional)) ;; Spacehammer's built-in
(for-each
(fn [ev] (: ev :post))
(hs.eventtap.event.newKeyEventSequence [:ctrl] "\\"))
Alas, that didn't work either. Even though this bug [probably] has nothing to do with this project, I am unsure where to report it since it seems to be working in the hs command-line tool.
(hs.eventtap.keyStroke nil "\\") seems to work fine for me.