diff options
author | Holger Zickner <[email protected]> | 2005-06-06 13:30:38 +0000 |
---|---|---|
committer | Holger Zickner <[email protected]> | 2005-06-06 13:30:38 +0000 |
commit | 578f8e93e01f36186a6199abfac7fd9ceb2a3575 (patch) | |
tree | 200cc81c863b8ffb29c9e0e2f8572ebf30e88009 /src/jake2/sys | |
parent | c8afb89ba54ef3b7492c2d8ada7f951b0107674f (diff) |
handle keys with AltGr properly
Diffstat (limited to 'src/jake2/sys')
-rw-r--r-- | src/jake2/sys/InputListener.java | 5 | ||||
-rw-r--r-- | src/jake2/sys/JOGLKBD.java | 8 |
2 files changed, 8 insertions, 5 deletions
diff --git a/src/jake2/sys/InputListener.java b/src/jake2/sys/InputListener.java index 2e2b57d..197cf67 100644 --- a/src/jake2/sys/InputListener.java +++ b/src/jake2/sys/InputListener.java @@ -2,7 +2,7 @@ * InputListener.java * Copyright (C) 2004 * - * $Id: InputListener.java,v 1.4 2004-12-14 00:11:01 hzi Exp $ + * $Id: InputListener.java,v 1.5 2005-06-06 13:30:37 hzi Exp $ */ /* Copyright (C) 1997-2001 Id Software, Inc. @@ -60,6 +60,9 @@ public final class InputListener implements KeyListener, MouseListener, } public void keyTyped(KeyEvent e) { + if ((e.getModifiersEx() & InputEvent.ALT_GRAPH_DOWN_MASK) != 0) { + addEvent(new Jake2InputEvent(Jake2InputEvent.KeyPress, e)); + } } public void mouseClicked(MouseEvent e) { diff --git a/src/jake2/sys/JOGLKBD.java b/src/jake2/sys/JOGLKBD.java index 194500f..52d59c0 100644 --- a/src/jake2/sys/JOGLKBD.java +++ b/src/jake2/sys/JOGLKBD.java @@ -197,11 +197,11 @@ final public class JOGLKBD extends KBD case KeyEvent.VK_DEAD_CIRCUMFLEX: key = '`'; break; default: - if ((ev.getModifiers() & (InputEvent.ALT_MASK | InputEvent.CTRL_MASK)) != 0) { - key = ev.getKeyCode(); - } else { +// if ((ev.getModifiers() & (InputEvent.ALT_MASK | InputEvent.CTRL_MASK)) != 0) { +// key = ev.getKeyCode(); +// } else { key = ev.getKeyChar(); - } +// } if (key >= 'A' && key <= 'Z') key = key - 'A' + 'a'; break; |