My app depends on the user granting Accessibility access (Allow this application to control your computer). There’s no formal permissions API (that I know of) for this, it just happens implicitly when I use the API for the first time. I get an error if the user hasn’t granted permission.
If the user grants permission and I'm able to successfully register my CGEventTap (a modifier key event tap), but then later revokes it, key responsiveness goes awry. I don’t get any kind of error to my callback, but I do get tapDisabledByTimeout
events periodically. I believe something is causing significant delays (but not preventing) in delivering events to my tap.
Upon receiving this, I'm considering attempting to register another tap as a way to test permission, and disabling the real one if I no longer have permission.
Does anyone have any better ideas?
For Apple: see FB13533901.
Hi,
Does AXIsProcessTrusted or AXIsProcessTrustedWithOptions APIs can help you ?