Hammerspoon / Spoons

The official repository of Spoon plugins
https://www.hammerspoon.org/Spoons/
453 stars 141 forks source link

cannot get hs.eventtap to work #248

Open dxlr8r opened 3 years ago

dxlr8r commented 3 years ago

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 commented 2 years ago

After updating to 12.0.1 it seems to work again.