Forums
New posts
Articles
Product Reviews
Policies
FAQ
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Menu
Log in
Register
Install the app
Install
Forums
macOS & iOS Developer Playground
macOS - Development and Darwin
Most Core Graphics key events not triggering in Java
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="owengall" data-source="post: 1848112" data-attributes="member: 404375"><p>See <a href="https://github.com/kwhat/jnativehook/issues/287" target="_blank">this issue on the jnativehook GitHub page</a> for more information. That’s where I first posted my question.</p><p></p><p><strong>Environment specs:</strong></p><p>IDE = Eclipse 2019-12 IDE</p><p>JavaFX = version 13</p><p>OS = macOS Catalina 10.15.3</p><p>jnativehook = version 2.1.0</p><p>libuiohook = dependency of jnativehook</p><p></p><p>The jnativehook library uses the JNI to call compiled c++ (?) code that creates Core Graphics event taps when run on a mac. When the system input events occur, in Java I can specify event handlers to handle them.</p><p></p><p>Most mouse events register fine and are passed to the Java event handlers. However, most key events are completely ignored. I’ve gone all the way to the source c++ code (libuiohook) where the event tap is created and confirm that no events are being registered. However, when I run the libuiohook through a compiled c++ driver program, all events are registered.</p><p></p><p>At this point I’m pretty sure that the issue of lost events has to do with the isolation of the JVM from the rest of the system. Does anyone know how to pass Core Graphics/Quartz events through to a Java app?</p><p></p><p>I’ve already tried asking on the Apple Dev forums but my question needs to be approved before it can be posted and after about a week I’ve seen no updates as to that. I’ve also asked this same question <a href="https://stackoverflow.com/" target="_blank">on stackoverflow</a>.</p></blockquote><p></p>
[QUOTE="owengall, post: 1848112, member: 404375"] See [URL='https://github.com/kwhat/jnativehook/issues/287']this issue on the jnativehook GitHub page[/URL] for more information. That’s where I first posted my question. [B]Environment specs:[/B] IDE = Eclipse 2019-12 IDE JavaFX = version 13 OS = macOS Catalina 10.15.3 jnativehook = version 2.1.0 libuiohook = dependency of jnativehook The jnativehook library uses the JNI to call compiled c++ (?) code that creates Core Graphics event taps when run on a mac. When the system input events occur, in Java I can specify event handlers to handle them. Most mouse events register fine and are passed to the Java event handlers. However, most key events are completely ignored. I’ve gone all the way to the source c++ code (libuiohook) where the event tap is created and confirm that no events are being registered. However, when I run the libuiohook through a compiled c++ driver program, all events are registered. At this point I’m pretty sure that the issue of lost events has to do with the isolation of the JVM from the rest of the system. Does anyone know how to pass Core Graphics/Quartz events through to a Java app? I’ve already tried asking on the Apple Dev forums but my question needs to be approved before it can be posted and after about a week I’ve seen no updates as to that. I’ve also asked this same question [URL='https://stackoverflow.com/']on stackoverflow[/URL]. [/QUOTE]
Verification
Post reply
Forums
macOS & iOS Developer Playground
macOS - Development and Darwin
Most Core Graphics key events not triggering in Java
Top