October 24, 2024
Chicago 12, Melborne City, USA
java

Java jNativeHook Problems in relation to key presses not working properly


My jNativehook isn’t being overridden by my custom key presses.

I have tried a variety of things to fix this problem. I have tried calling the method explicitly. I have also tried to merge the different classes to allow for the function to load properly. Finally, I have also tried to remove this library entirely, but then I am not able to use the button clicks when a different object is focused, which is essential for my project to work properly. It would be incredibly helpful if anyone could assist me with this error.

Here is a public Gist with my code: "https://gist.github.com/AadiChoudhary0130/e670bf47b7b4add9cae4149013fff1bb".

The relevant classes are NativeKeyPressHandler and Main_App_Screen. Some example of this problem is when I press enter, it goes to the next line rather than evaluating the function. Pressing shift i should also produce the unicode character "\uD835\uDC56", but it actually produces "I". I did try to create a minimum reproducible example, but it requires roughly the same amount of code.



You need to sign in to view this answers

Leave feedback about this

  • Quality
  • Price
  • Service

PROS

+
Add Field

CONS

+
Add Field
Choose Image
Choose Video