Closed fy-create closed 3 years ago
Sure, as soon as I find some docs from apple that talk about how to to actually target the M1. See: https://github.com/kwhat/libuiohook/runs/2011216721
error: unknown target CPU 'aarch64'
note: valid target CPU values are: nocona, core2, penryn, bonnell, atom, silvermont, slm, goldmont, goldmont-plus, tremont, nehalem, corei7, westmere, sandybridge, corei7-avx, ivybridge, core-avx-i, haswell, core-avx2, broadwell, skylake, skylake-avx512, skx, cascadelake, cooperlake, cannonlake, icelake-client, icelake-server, tigerlake, knl, knm, k8, athlon64, athlon-fx, opteron, k8-sse3, athlon64-sse3, opteron-sse3, amdfam10, barcelona, btver1, btver2, bdver1, bdver2, bdver3, bdver4, znver1, znver2, x86-64
make[1]: *** [CMakeFiles/cmTC_1ee3a.dir/testCCompiler.c.o] Error 1
make: *** [cmTC_1ee3a/fast] Error 2
I've posted on numerios forums to try and figure out how to do this with absolutely zero useful answers. If you or anyone else wants it, figure out how to do it.
I am currently on an M1 Mac Mini and I am able to use the JNI for Keyboard Input monitoring, at the very least, as well as mouse movement and position.
There are some bugs such as the keyCode
being set to 0 for each key, however, a raw key code is being displayed so I imagine it's possible to fix getKeyCode()
Are you able to compile it on the M1 or are you using the x86 emulation? I do not have access to the hardware so unless I can get a lot more info there isn't much I can do.
Support has been added, please test and let me know if it works ok.
There maybe some issues with what Apple reports for System.getProperty("os.arch") on the M1, if it does not work a simple patch will be needed at NativeSystem.java#L114
Artifacts should be on maven as snapshots as well as https://github.com/kwhat/jnativehook/actions/runs/1239449442
Update: fixed a number of issues, the link should reflect the latest build that includes the correct binaries.
Could jnativehook support Apple Silicon