From 2b3cf2cdb6af56d43638063a7eaac6914369a335 Mon Sep 17 00:00:00 2001 From: Holger Zickner Date: Wed, 3 Nov 2004 10:16:42 +0000 Subject: bugfix 1056765 allow use of character and modifier keys simultaneously --- src/jake2/sys/KBD.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/jake2/sys') diff --git a/src/jake2/sys/KBD.java b/src/jake2/sys/KBD.java index b88e2e3..3272090 100644 --- a/src/jake2/sys/KBD.java +++ b/src/jake2/sys/KBD.java @@ -2,7 +2,7 @@ * KBD.java * Copyright (C) 2004 * - * $Id: KBD.java,v 1.4 2004-11-03 08:53:27 hzi Exp $ + * $Id: KBD.java,v 1.5 2004-11-03 10:16:42 hzi Exp $ */ /* Copyright (C) 1997-2001 Id Software, Inc. @@ -212,7 +212,11 @@ public final class KBD { case KeyEvent.VK_DEAD_CIRCUMFLEX: key = '`'; break; default: - key = ev.getKeyChar(); + 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; -- cgit v1.2.3