repeats / SimpleNativeHooks

Java keyboard and mouse event listener library.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

There is no way to "enable access for assistive devices" on newer Mac OSX versions causing key listeners to not work.

mgroth0 opened this issue · comments

As the title suggests, I'm running into the error:

Jan 07, 2022 7:17:46 PM org.simplenativehooks.AbstractNativeHookEventProcessor start
INFO: OSX Hook: running command $/Users/matt/Desktop/app/resources/nativehooks/osx/RepeatHook.out
Jan 07, 2022 7:17:46 PM org.simplenativehooks.osx.GlobalOSXEventOchestrator processStderr
INFO: failed to create event tap
Jan 07, 2022 7:17:46 PM org.simplenativehooks.osx.GlobalOSXEventOchestrator processStdout
INFO: Setting up...
Jan 07, 2022 7:17:46 PM org.simplenativehooks.osx.GlobalOSXEventOchestrator processStderr
INFO: you need to enable "Enable access for assitive devices" in Universal Access preference panel.

However, those directions are out of date. There is no such checkbox to enable access for assistive devices any more. There is a way to enable access for individual apps, in System Preferences > Security & Privacy > Privacy > Accesibility. This list is populated automatically but you can also add individual apps. After running this, there is no new checkbox in the list. I tried adding "java" to the list and checking that, but the issue still persists.

System Preferences > Security & Privacy > Privacy > Accesibility is indeed the right way to enable this.

It's currently working on my Mac and I'm using macOS 12.1. I have the following apps enabled:
Library > Java > JavaVirtualMachines > jdk-10.0.1.jdk > Contents > Home > bin
Library > Internet > Plug-Ins > JavaAppletPlugin.plugin > Contents > Home > bin
Terminal (the terminal itself)