diff options
author | Holger Zickner <[email protected]> | 2005-06-06 18:22:20 +0000 |
---|---|---|
committer | Holger Zickner <[email protected]> | 2005-06-06 18:22:20 +0000 |
commit | def1ad7e53ee32f2593971e1b7f7ef06aa02b3ec (patch) | |
tree | 8f3fe04971c47d381507fc2cd0de3a0113b3adbb /src/jake2/sys | |
parent | 684416e41caa0cf877bbdb2b70d914970d44c7cb (diff) |
handle characters with AltGr properly
Diffstat (limited to 'src/jake2/sys')
-rw-r--r-- | src/jake2/sys/InputListener.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/jake2/sys/InputListener.java b/src/jake2/sys/InputListener.java index 197cf67..8cbe2ae 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.5 2005-06-06 13:30:37 hzi Exp $ + * $Id: InputListener.java,v 1.6 2005-06-06 18:22:20 hzi Exp $ */ /* Copyright (C) 1997-2001 Id Software, Inc. @@ -52,7 +52,9 @@ public final class InputListener implements KeyListener, MouseListener, } public void keyPressed(KeyEvent e) { - addEvent(new Jake2InputEvent(Jake2InputEvent.KeyPress, e)); + if (!((e.getModifiersEx() & InputEvent.ALT_GRAPH_DOWN_MASK) != 0)) { + addEvent(new Jake2InputEvent(Jake2InputEvent.KeyPress, e)); + } } public void keyReleased(KeyEvent e) { @@ -62,6 +64,7 @@ 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)); + addEvent(new Jake2InputEvent(Jake2InputEvent.KeyRelease, e)); } } |