String (@Nullable KeyEvent key) { if (key == null) return null; final KeyStroke keystroke = KeyStroke.getKeyStrokeForEvent(key); return keystroke != null ? getShortcutText(new KeyboardShortcut(keystroke, null)) : "Unknown"; }