libuiohook icon indicating copy to clipboard operation
libuiohook copied to clipboard

Add keychar support to press and release

Open slendidev opened this issue 1 year ago • 2 comments

slendidev avatar Aug 16 '23 13:08 slendidev

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.

Albator11 avatar Aug 19 '23 23:08 Albator11

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...

Albator11 avatar Aug 19 '23 23:08 Albator11