String (@NotNull KeyStroke keyStroke, String delimiter, boolean onlyDelimIntoModifiersAndKey) { String modifiers = getModifiersText(keyStroke.getModifiers()); final String key = KeymapUtil.getKeyText(keyStroke.getKeyCode()); if (!onlyDelimIntoModifiersAndKey) { modifiers = getModifiersText(keyStroke.getModifiers(), delimiter); } if (delimiter != null) { if (modifiers.isEmpty()) return key; return modifiers + delimiter + key; } return modifiers + key; }