return null key stroke for VK_UNDEFINED
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sat, 24 May 2008 16:52:25 +0000 (18:52 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sat, 24 May 2008 16:52:25 +0000 (18:52 +0200)
src/net/pterodactylus/jsite/i18n/I18n.java

index 0fe571a..6d62356 100644 (file)
@@ -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);