I am using a java library called JNativehook to receive typing event on Lubuntu and Windows, My problem is when I type a character on Lubuntu with an Arabic keyboard layout I receive the English neighbor of the key, But when I used the library on Windows I was receiving the correct key, Why is this happening ? and how can I fix it ? Here is my code :
public void nativeKeyTyped(NativeKeyEvent e)
{
System.out.println("char: " + e.getKeyChar());
}
I download 2.1 from here https://oss.sonatype.org/content/repositories/snapshots/com/1stleg/jnativehook/2.1.SNAPSHOT/ , But the problem get even worse, when I type one Arabic character I receive weird characters and a lot of events and this just a small part of the output
INFO: hook_event_proc [314]: Key 0 typed. (罟)
Oct 19, 2016 4:43:27 PM org.jnativehook.GlobalScreen$NativeHookThread enable
INFO: hook_event_proc [314]: Key 0 typed. (ý
Oct 19, 2016 4:43:27 PM org.jnativehook.GlobalScreen$NativeHookThread enable
INFO: hook_event_proc [314]: Key 0 typed. (罟)
Oct 19, 2016 4:43:27 PM org.jnativehook.GlobalScreen$NativeHookThread enable
INFO: hook_event_proc [314]: Key 0 typed. ()
Oct 19, 2016 4:43:27 PM org.jnativehook.GlobalScreen$NativeHookThread enable
INFO: hook_event_proc [314]: Key 0 typed. ()
Oct 19, 2016 4:43:27 PM org.jnativehook.GlobalScreen$NativeHookThread enable
INFO: hook_event_proc [314]: Key 0 typed. (
Oct 19, 2016 4:43:27 PM org.jnativehook.GlobalScreen$NativeHookThread enable
INFO: hook_event_proc [314]: Key 0 typed. (
Oct 19, 2016 4:43:27 PM org.jnativehook.GlobalScreen$NativeHookThread enable
INFO: hook_event_proc [314]: Key 0 typed. (
Oct 19, 2016 4:43:27 PM org.jnativehook.GlobalScreen$NativeHookThread enable
INFO: hook_event_proc [314]: Key 0 typed. (
Oct 19, 2016 4:43:27 PM org.jnativehook.GlobalScreen$NativeHookThread enable
INFO: hook_event_proc [314]: Key 0 typed. (ý½
Oct 19, 2016 4:43:27 PM org.jnativehook.GlobalScreen$NativeHookThread enable
INFO: hook_event_proc [314]: Key 0 typed. (罟)
Char: