String (Shortcut shortcut) { if (shortcut instanceof MouseShortcut) { return KeymapUtil.getMouseShortcutString((MouseShortcut)shortcut); } else if (shortcut instanceof KeyboardShortcut) { KeyStroke fst = ((KeyboardShortcut)shortcut).getFirstKeyStroke(); String s = getText(fst); KeyStroke snd = ((KeyboardShortcut)shortcut).getSecondKeyStroke(); if (snd != null) { s += ',' + getText(snd); } return s; } else { return KeymapUtil.getShortcutText(shortcut); } }