ShortcutSet (boolean isUp) { AnAction action = ActionManager.getInstance().getActionOrStub(isUp ? IdeActions.ACTION_EDITOR_MOVE_CARET_UP : IdeActions.ACTION_EDITOR_MOVE_CARET_DOWN); if (action != null) { return action.getShortcutSet(); } return new CustomShortcutSet(KeyStroke.getKeyStroke(isUp ? KeyEvent.VK_UP : KeyEvent.VK_DOWN, 0)); }