From: David ‘Bombe’ Roden Date: Sat, 24 May 2008 16:52:25 +0000 (+0200) Subject: return null key stroke for VK_UNDEFINED X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=06602fb38a0a5f943c967da582b7a304f5ea5d51;p=jSite2.git return null key stroke for VK_UNDEFINED --- 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);