libuiohook
libuiohook copied to clipboard
Add keychar support to press and release
I assume you mean that keys like A-Z don't appear to trigger any events? If so, I'm having the same problem on MacOS 12.6.8. (special keys like shift, control, command, all appear work...)
I've been trying to use this via SharpHook, but I decided I should probably test the actual library rather than the a wrapper to see if it works. I compiled it and tried demo_hook
and it behaves the same as my C# version. i.e. only special keys that don't type anything seem to work.
Oh wow... that seems so broken. I found a python library keyboard
and tried it out. It works! But only if running as sudo... (which it says is needed when you run it) So that got me thinking that maybe that's all uiohook needs. And yep, running demo_hook
as sudo worked just fine.
Is there some way to warn/throw an error when not running as sudo on MacOS? If nothing else, this should be documented right? Seems strange that modifier keys work just fine without using sudo though...