6.1.1 kCGSessionEventTap difficulties #141
Closed
BlackCoyote
started this conversation in
Ideas
Replies: 1 comment
-
|
Hi! I've converted this discussion to an issue as it looks like it should be fixed. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hey,
Ever since version 6.1.1, some applications on MacOS aren't able to detect keystrokes anymore unless they are in the foreground.
The issue was introduced on 6.1.1. When going through versions and testing my test case (which is sending a keystroke to OBS to switch a scene) it works as expected (OBS detects the keystroke even when not in focus) all the way up to and including 6.1.0. Once i switch to 6.1.1 and beyond, OBS no longer recognises the keystrokes unless the app is in focus.
The likely cause for this behaviour change was this libuiohook change in which kCGHIDEventTap was switched out for kCGSessionEventTap. This was a valid change to resolve another issue that I discovered, where the mouse click positions wouldn't be accurate when the accessibility zoom was used.
Both the accessibility zoom functionality, and the reliability of all apps detecting the keystrokes even when not in focus are very useful abilities for the library in my opinion. It seems though that these are unfortunately mutually exclusive behaviours.
Would it be an option to have libuiohook automatically switch between those 2 flags depending on whether the event is a keyboard or a mouse event? Alternatively, could the flag be chosen through a property on the EventSimulator class, or an argument in its simulation methods?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions