Collection<KeyStroke> (boolean isUp) { Collection<KeyStroke> result = new ArrayList<>(); final ShortcutSet shortcutSet = getShortcutUpDown(isUp); for (Shortcut shortcut : shortcutSet.getShortcuts()) { if (shortcut.isKeyboard() && ((KeyboardShortcut)shortcut).getSecondKeyStroke() == null) { result.add(((KeyboardShortcut)shortcut).getFirstKeyStroke()); } } return result; }