From 4898f582d9303caa7fd1b44438808e86b51c2a3b Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Sat, 6 Apr 2013 04:47:34 +0200 Subject: Bug 678: Differentiate ALT (left) and ALT_GRAPH (right) on X11, EventDev, Windows and OSX - X11: Memorize pressed Alt_R to decide which 'alt' has to be used for non key modifier fetching - Windows: Only use GetKeyState(..) and compare the US vkey, since int. kbd layout use reduced scancode --- src/newt/classes/jogamp/newt/driver/linux/LinuxEventDeviceTracker.java | 2 +- src/newt/classes/jogamp/newt/driver/macosx/MacKeyUtil.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/newt/classes/jogamp') diff --git a/src/newt/classes/jogamp/newt/driver/linux/LinuxEventDeviceTracker.java b/src/newt/classes/jogamp/newt/driver/linux/LinuxEventDeviceTracker.java index 2c0e6d3dd..bc69c2204 100644 --- a/src/newt/classes/jogamp/newt/driver/linux/LinuxEventDeviceTracker.java +++ b/src/newt/classes/jogamp/newt/driver/linux/LinuxEventDeviceTracker.java @@ -586,7 +586,7 @@ public class LinuxEventDeviceTracker implements WindowListener { break; // FIXME case 100: // right alt - return KeyEvent.VK_ALT; + return KeyEvent.VK_ALT_GRAPH; case 101: // linefeed break; // FIXME case 102: // home diff --git a/src/newt/classes/jogamp/newt/driver/macosx/MacKeyUtil.java b/src/newt/classes/jogamp/newt/driver/macosx/MacKeyUtil.java index c07576901..baa94facd 100644 --- a/src/newt/classes/jogamp/newt/driver/macosx/MacKeyUtil.java +++ b/src/newt/classes/jogamp/newt/driver/macosx/MacKeyUtil.java @@ -317,7 +317,7 @@ public class MacKeyUtil { case kVK_Option: return KeyEvent.VK_ALT; case kVK_Control: return KeyEvent.VK_CONTROL; case kVK_RightShift: return KeyEvent.VK_SHIFT; - case kVK_RightOption: return KeyEvent.VK_ALT; + case kVK_RightOption: return KeyEvent.VK_ALT_GRAPH; case kVK_RightControl: return KeyEvent.VK_CONTROL; // case kVK_Function: return KeyEvent.VK_F; case kVK_F17: return KeyEvent.VK_F17; -- cgit v1.2.3