Collection<String> (KeyboardShortcut shortcut, String actionId, Keymap keymap) { String sysAct = getSystemShortcutAction(shortcut.getFirstKeyStroke()); Collection<String> keymapConflicts = keymap.getConflicts(actionId, shortcut).keySet(); if (sysAct == null) { return keymapConflicts; } if (keymapConflicts.isEmpty()) { return Collections.singletonList(sysAct); } List<String> result = new ArrayList<>(keymapConflicts); result.add(sysAct); return result; }