summaryrefslogtreecommitdiffstats
path: root/src/newt/classes/com
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2013-04-06 04:47:34 +0200
committerSven Gothel <[email protected]>2013-04-06 04:47:34 +0200
commit4898f582d9303caa7fd1b44438808e86b51c2a3b (patch)
tree6dbc1fe716e922828709aec69ab3f20ac0e299d7 /src/newt/classes/com
parent9cf72802f4559efa77baa14ae5d501bc341bf86a (diff)
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
Diffstat (limited to 'src/newt/classes/com')
-rw-r--r--src/newt/classes/com/jogamp/newt/event/InputEvent.java2
-rw-r--r--src/newt/classes/com/jogamp/newt/event/KeyEvent.java5
2 files changed, 5 insertions, 2 deletions
diff --git a/src/newt/classes/com/jogamp/newt/event/InputEvent.java b/src/newt/classes/com/jogamp/newt/event/InputEvent.java
index 4920b59ea..b04ebc1af 100644
--- a/src/newt/classes/com/jogamp/newt/event/InputEvent.java
+++ b/src/newt/classes/com/jogamp/newt/event/InputEvent.java
@@ -133,7 +133,7 @@ public abstract class InputEvent extends NEWTEvent
if(isControlDown()) { if(!isFirst) { sb.append(", "); } isFirst = false; sb.append("ctrl"); }
if(isMetaDown()) { if(!isFirst) { sb.append(", "); } isFirst = false; sb.append("meta"); }
if(isAltDown()) { if(!isFirst) { sb.append(", "); } isFirst = false; sb.append("alt"); }
- if(isAltGraphDown()) { if(!isFirst) { sb.append(", "); } isFirst = false; sb.append("altg"); }
+ if(isAltGraphDown()) { if(!isFirst) { sb.append(", "); } isFirst = false; sb.append("altgr"); }
if(isAutoRepeat()) { if(!isFirst) { sb.append(", "); } isFirst = false; sb.append("repeat"); }
for(int i=1; i<=MouseEvent.BUTTON_NUMBER; i++) {
if(isButtonDown(i)) { if(!isFirst) { sb.append(", "); } isFirst = false; sb.append("button").append(i); }
diff --git a/src/newt/classes/com/jogamp/newt/event/KeyEvent.java b/src/newt/classes/com/jogamp/newt/event/KeyEvent.java
index 5117ffe29..777c9b471 100644
--- a/src/newt/classes/com/jogamp/newt/event/KeyEvent.java
+++ b/src/newt/classes/com/jogamp/newt/event/KeyEvent.java
@@ -325,6 +325,9 @@ public class KeyEvent extends InputEvent
public static final short VK_CLEAR = (short) 0x0C;
public static final short VK_SHIFT = (short) 0x10;
public static final short VK_CONTROL = (short) 0x11;
+ /**
+ * Constant for the ALT function key, i.e. left ALT key.
+ */
public static final short VK_ALT = (short) 0x12;
public static final short VK_PAUSE = (short) 0x13;
public static final short VK_CAPS_LOCK = (short) 0x14;
@@ -862,7 +865,7 @@ public class KeyEvent extends InputEvent
public static final short VK_COMPOSE = (short) 0xFF20;
/**
- * Constant for the AltGraph function key.
+ * Constant for the ALT_GRAPH function key, i.e. right ALT key.
*/
public static final short VK_ALT_GRAPH = (short) 0xFF7E;