jnativehook icon indicating copy to clipboard operation
jnativehook copied to clipboard

nativeKeyTyped is never fired. Key character is always the same.

Open zeroeightysix opened this issue 7 years ago • 8 comments

I'm experiencing two issues.

  1. nativeKeyTyped is never fired. Pressing a key will fire nativeKeyPressed, but holding that key down until the characters start repeating will, instead of firing nativeKeyTyped, keep firing nativeKeyPressed.
  2. getKeyChar, is for every key and every event always - that's (char) 65535;.

Here's the code I used to test.

When holding the a key and letting it repeat itself: output Pressing random keys. Notice the character is the same: output

Tested on: 64-Bit Windows 10 Pro AZERTY Keyboard (Belgian layout) (Corsair Strafe RGB)

zeroeightysix avatar Jun 09 '18 11:06 zeroeightysix

Something is not being processed correctly with your layout. Check the log output at the debug level for key events and see if there is an error loading any language DLL files or something like that.

kwhat avatar Jun 09 '18 21:06 kwhat

I set the logger to ALL, moved my mouse, mashed a few keys and then terminated the application. Here's the output: outlog.log (Also contains the debug output I made myself, same code as originally posted) I couldn't spot any errors, though.

zeroeightysix avatar Jun 09 '18 21:06 zeroeightysix

The issue is at SEVERE: refresh_locale_list [628]: Could not find keyboard map for locale 0X0000000008130813! You are not getting key typed events because the layout could not load thus the key typed event didn't produce a key char. I think this is fixed in the trunk. I am working on getting the compiler working again. Nightly soon.

kwhat avatar Jun 10 '18 05:06 kwhat

Hi there! Any update/est. on this matter?

Karpatenhund avatar Jul 02 '18 09:07 Karpatenhund

Hey, I just got the OS X compiler compiling again. There were some issues with LLVM 6 and there were a lot of crufty patches and questionable headers being used in the old process. Anyway, I should have a better working toolchain in the next week maybe two and then I can start doing nightly builds again.

On Mon, Jul 2, 2018 at 2:12 AM, Nils [email protected] wrote:

Hi there! Any update/est. on this matter?

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/kwhat/jnativehook/issues/226#issuecomment-401726375, or mute the thread https://github.com/notifications/unsubscribe-auth/AApRRHf5kXRUxbdVpf7kp_Pq0D0R95oWks5uCeQUgaJpZM4UhS-2 .

kwhat avatar Jul 02 '18 10:07 kwhat

Awesome! Thanks for all the work you put into this project. Really appreciate it! :)

Karpatenhund avatar Jul 02 '18 12:07 Karpatenhund

Hello! Any updates or estimates on this fix?

jillianketterer avatar Oct 09 '18 15:10 jillianketterer

Same issue with being unable to find keyboard map. Windows 10 Home 64 bit QWERTY Keyboard English US layout (on laptop) JDK 8 and OpenJDK 11

Mar 08, 2019 12:05:35 PM org.jnativehook.GlobalScreen$NativeHookThread enable
INFO: process_key_pressed [227]: Key 0X25 pressed. (0X4B)

Mar 08, 2019 12:05:35 PM org.jnativehook.GlobalScreen$NativeHookThread enable
INFO: refresh_locale_list [470]: GetKeyboardLayoutList(0, NULL) found 1 layouts.

Mar 08, 2019 12:05:35 PM org.jnativehook.GlobalScreen$NativeHookThread enable
INFO: refresh_locale_list [487]: Received 1 locales.

Mar 08, 2019 12:05:35 PM org.jnativehook.GlobalScreen$NativeHookThread enable
SEVERE: refresh_locale_list [628]: Could not find keyboard map for locale 0X0000000004090409!

Mar 08, 2019 12:05:35 PM org.jnativehook.GlobalScreen$NativeHookThread enable
INFO: win_hook_event_proc [634]: Restarting Windows input hook on window event: 0X800C.

Mar 08, 2019 12:05:35 PM org.jnativehook.GlobalScreen$NativeHookThread enable
INFO: process_key_released [286]: Key 0X25 released. (0X4B)

xt449 avatar Mar 08 '19 17:03 xt449