if (keyToken.startsWith("VK_")) {
try {
Field field = KeyEvent.class.getField(keyToken);
- System.out.println("asked for: “" + key + "”, will return " + field.getInt(null));
return KeyStroke.getKeyStroke(field.getInt(null), modifierMask);
} catch (SecurityException e) {
/* ignore. */
/* ignore. */
}
}
- System.out.println("asked for: “" + key + "”, will return " + keyToken.charAt(0));
return KeyStroke.getKeyStroke(keyToken.charAt(0), modifierMask);
}
}