Closed victorlsn closed 4 years ago
Could you maybe provide some information like macOS version or what compiler you used?
From https://developer.apple.com/documentation/coregraphics/1454426-cgeventtapcreate Event taps receive key up and key down events if one of the following conditions is true:
The current process is running as the root user.
Access for assistive devices is enabled. In OS X v10.4, you can enable this feature using System Preferences, Universal Access panel, Keyboard view.
I am getting the same, not sure why
Solved it. Go to Settings -> Security & Privacy -> Accessibility and tick Terminal. Now run the command again
Thanks for posting a fix!
I still get this error even with accessibility enabled for my terminal (alacritty).
Interestingly, I tried running it from the builtin Terminal app and it worked (both have accessibility enabled).
I keep getting this error: ERROR: Unable to create event tap.