2016-10-18 3 views
0

Ich benutze eine Java-Bibliothek namens JNativehook, um Eingabeereignis auf Lubuntu und Windows zu erhalten, Mein Problem ist, wenn ich einen Buchstaben auf Lubuntu mit einem arabischen Tastaturlayout erhalte ich den englischen Nachbarn des Schlüssels, aber wenn ich Benutzte die Bibliothek unter Windows Ich erhielt den richtigen Schlüssel, Warum passiert das? und wie kann ich es reparieren? Hier ist mein Code:Linux Tastaturlayouts

public void nativeKeyTyped(NativeKeyEvent e) 
{ 
    System.out.println("char: " + e.getKeyChar()); 
} 

I 2.1 von hier https://oss.sonatype.org/content/repositories/snapshots/com/1stleg/jnativehook/2.1.SNAPSHOT/ herunterladen, aber das Problem noch schlimmer, wenn ich ein arabisches Zeichen Typen I seltsame Zeichen und eine Menge von Ereignissen und diese nur einen kleinen Teil des Empfang Ausgabe

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: 

Antwort

1

Das Problem ist mit, wie diese auf Linux übersetzt werden, ich habe die unterstützende Bibliothek geändert, die das Problem in 2.1 gelöst hat.

+0

Die Version, die ich verwende ist 2.3 – sam01

+0

Sie verwenden 2.0.3, 2.1.0 wird die Fix-Version sein;) –

+0

Aber die letzte binäre Version ist 2.0.3 https://github.com/kwhat/jnativehook/ Releases, Soll ich die Quelle kompilieren? – sam01

Verwandte Themen