Open rsyanik opened 7 years ago
This is a duplicate of bug #170, I have a fix but no time because I am too busy fixing gearman bugs right now...
pls @kwhat, according to the error code: SEVERE: refresh_locale_list [628]: Could not find keyboard map for locale 0X0000000004090409! I think this indicate the nativeKeyTyped event could not response properly, because with me here am having the same issue where I tried to get the character value for the key-typed within the method, and instead to return the char value it rather return the above error. it will be more appreciated if this bug could address at earliest . Thanks!
Ok this should address a number of issues that people have been having including this one. Please test and let me know if this issue can be closed.
Ops! Am having different issue again! is not showing the correct keyTyped... here is my override method
@Override public void nativeKeyTyped(NativeKeyEvent e) { System.out.println("KeyTyped:" + NativeKeyEvent.getKeyText(e.getKeyChar())); }
when i run, here is the result!
KeyPressed: 1 KeyTyped:N Key Released: 1 KeyPressed: 2 KeyTyped:M Key Released: 2 KeyPressed: d KeyTyped:F17 Key Released: D KeyPressed: g KeyTyped:F20 Key Released: G
Any solution to this pls?.
NativeKeyEvent.getKeyText()
does not take a key char, it takes a key code. You should just be able to do System.out.println("KeyTyped:" + e.getKeyChar());
Working fine!! Thanks...
Working fine!! Thanks...
Hi,
Above link is broken -
JNativeHook-2.1.1-rc -
JNativeHook-2.0.4-rc -
Currently I am using with java 8
<dependency>
<groupId>com.1stleg</groupId>
<artifactId>jnativehook</artifactId>
<version>2.1.0</version>
</dependency>
Unfortunately Its also not working for me Could you please help me by sending the jar file because nativeKeyTyped is also not working for me. It throwing - Could not find keyboard map for locale 0X04090409!
@kwhat - Could you please help me how to get its resolve
Thanks & Regards, Vikas Gupta
@vikku-vikasgupta Kwhat posted a new jar below. I'm about to test it out now. https://github.com/kwhat/jnativehook/issues/170#issuecomment-514874144
the above links are still broken , can someone tell us how to get the latest jar . thanks
I am working on moving the builds and packages to github, you should be able to get nightly snapshots jars from github actions. The builds are hung up for windows on a maven cmake plugin bug that should be fixed in the next release of that plugin.
Please test jnativehook-2.2-20210107.030301-37.jar I have done some refactoring to the function that is probably responsible for this issue but because I cannot reproduce the problem, I need one of you to test it and let me know if it is working. I still don't know exactly why this was an issue nor why I cannot reproduce it.
Also had the described issue
Feb. 09, 2021 2:38:14 NACHM. org.jnativehook.GlobalScreen$NativeHookThread enable
SCHWERWIEGEND: refresh_locale_list [628]: Could not find keyboard map for locale 0X0000000004070407!
I did update to the newest snapshot on the maven sonatype repo (exact version is 2.2-20210107.030301-37
):
<repositories>
<repository>
<id>sonatype</id>
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
<snapshots><enabled>true</enabled></snapshots>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>com.github.kwhat</groupId>
<artifactId>jnativehook</artifactId>
<version>2.2-SNAPSHOT</version>
</dependency>
</dependencies>
Since then I never encountered the warning message again, so I would consider this as resolved.
Thank you for fixing this tedious issue, keep up the great work!
When using the Example Code for the GlobalKeyboardListener I get the following logging info: I realize there is an open issue about this already, but i wanted to add this in because it doesn't seem to me that this should be happening with the example code.
Key Pressed: J Jul 05, 2017 9:52:39 AM org.jnativehook.GlobalScreen$NativeHookThread enable INFO: refresh_locale_list [470]: GetKeyboardLayoutList(0, NULL) found 1 layouts.
Jul 05, 2017 9:52:39 AM org.jnativehook.GlobalScreen$NativeHookThread enable INFO: refresh_locale_list [487]: Received 1 locales.
Jul 05, 2017 9:52:39 AM org.jnativehook.GlobalScreen$NativeHookThread enable SEVERE: refresh_locale_list [628]: Could not find keyboard map for locale 0X0000000004090409!
Jul 05, 2017 9:52:39 AM org.jnativehook.GlobalScreen$NativeHookThread enable INFO: process_key_released [286]: Key 0X24 released. (0X4A)
Key Released: J Jul 05, 2017 9:52:55 AM org.jnativehook.GlobalScreen$NativeHookThread enable INFO: process_key_pressed [227]: Key 0X12 pressed. (0X45)
Key Pressed: E Jul 05, 2017 9:52:55 AM org.jnativehook.GlobalScreen$NativeHookThread enable INFO: refresh_locale_list [470]: GetKeyboardLayoutList(0, NULL) found 1 layouts.
Jul 05, 2017 9:52:55 AM org.jnativehook.GlobalScreen$NativeHookThread enable INFO: refresh_locale_list [487]: Received 1 locales.
Jul 05, 2017 9:52:55 AM org.jnativehook.GlobalScreen$NativeHookThread enable SEVERE: refresh_locale_list [628]: Could not find keyboard map for locale 0X0000000004090409!
Jul 05, 2017 9:52:55 AM org.jnativehook.GlobalScreen$NativeHookThread enable INFO: process_key_released [286]: Key 0X12 released. (0X45)
Key Released: E Jul 05, 2017 9:53:00 AM org.jnativehook.GlobalScreen$NativeHookThread enable INFO: win_hook_event_proc [634]: Restarting Windows input hook on window event: 0X800C.
Jul 05, 2017 9:53:07 AM org.jnativehook.GlobalScreen$NativeHookThread enable INFO: process_key_pressed [227]: Key 0X12 pressed. (0X45)
Jul 05, 2017 9:53:07 AM org.jnativehook.GlobalScreen$NativeHookThread enable INFO: refresh_locale_list [470]: GetKeyboardLayoutList(0, NULL) found 1 layouts.
Jul 05, 2017 9:53:07 AM org.jnativehook.GlobalScreen$NativeHookThread enable INFO: refresh_locale_list [487]: Received 1 locales.
Key Pressed: E