From 06602fb38a0a5f943c967da582b7a304f5ea5d51 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Sat, 24 May 2008 18:52:25 +0200 Subject: [PATCH] return null key stroke for VK_UNDEFINED --- src/net/pterodactylus/jsite/i18n/I18n.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/net/pterodactylus/jsite/i18n/I18n.java b/src/net/pterodactylus/jsite/i18n/I18n.java index 0fe571a..6d62356 100644 --- a/src/net/pterodactylus/jsite/i18n/I18n.java +++ b/src/net/pterodactylus/jsite/i18n/I18n.java @@ -157,6 +157,9 @@ public class I18n { modifierMask |= InputEvent.SHIFT_DOWN_MASK; } else { if (keyToken.startsWith("VK_")) { + if (keyToken.equals("VK_UNDEFINED")) { + return null; + } try { Field field = KeyEvent.class.getField(keyToken); return KeyStroke.getKeyStroke(field.getInt(null), modifierMask); -- 2.7.4