diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/newt/classes/jogamp/newt/driver/linux/LinuxEventDeviceTracker.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/newt/classes/jogamp/newt/driver/linux/LinuxEventDeviceTracker.java b/src/newt/classes/jogamp/newt/driver/linux/LinuxEventDeviceTracker.java index 5c2a69142..5efce2524 100644 --- a/src/newt/classes/jogamp/newt/driver/linux/LinuxEventDeviceTracker.java +++ b/src/newt/classes/jogamp/newt/driver/linux/LinuxEventDeviceTracker.java @@ -258,7 +258,7 @@ public class LinuxEventDeviceTracker implements WindowListener { break; case 1: // EV_KEY keyCode = LinuxEVKey2NewtVKey(code); // The device independent code. - keyChar = LinuxEVKey2Unicode(code); // The printable character w/o key modifiers. + keyChar = NewtVKey2Unicode(keyCode); // The printable character w/o key modifiers. switch(value) { case 0: modifiers=0; @@ -314,6 +314,13 @@ public class LinuxEventDeviceTracker implements WindowListener { stop=true; } + private char NewtVKey2Unicode(int VK){ + if(KeyEvent.isPrintableKey(VK)){ + return (char)VK; + } + return 0; + } + private char LinuxEVKey2Unicode(short EVKey) { // This is the stuff normally mapped by a system keymap |