Spoons icon indicating copy to clipboard operation
Spoons copied to clipboard

cannot get hs.eventtap to work

Open dxlr8r opened this issue 4 years ago • 1 comments

Yesterday FnMate worked, today it does not after applying a security update to Catalina (10.15.7).

My config:

hs.loadSpoon("FnMate")

hello = hs.eventtap.new({hs.eventtap.event.types.keyDown}, function(e)
  print("hello")
end):start()

Edit: Both FnMate and my small demo below gives no result when trying to press combinations. Like fn-h in FnMate, simply just results in a regular h. And there is no message to the console from the hello statement at the bottom.

Examples from the documentation, like:

hs.hotkey.bind({"cmd", "alt", "ctrl"}, "W", function()
  hs.alert.show("Hello World!")
end)

Works perfectly.

Edit: I also made sure:

Click on the Security & Privacy icon, then the Privacy tab and then Accessibility from the list. You should ensure that Hammerspoon is present in this list and is ticked.

As well as:

tccutil reset All org.hammerspoon.Hammerspoon

dxlr8r avatar Nov 18 '21 21:11 dxlr8r

After updating to 12.0.1 it seems to work again.

dxlr8r avatar Dec 09 '21 13:12 dxlr8r