void (KeyEvent e) { if (e.getKeyCode() == KeyEvent.VK_ENTER || e.getKeyCode() == KeyEvent.VK_SPACE) { InputEvent event = e; if (e.getComponent() instanceof JComponent) { ActionLink link = UIUtil.findComponentOfType((JComponent)e.getComponent(), ActionLink.class); if (link != null) { event = new MouseEvent(link, MouseEvent.MOUSE_CLICKED, e.getWhen(), e.getModifiers(), 0, 0, 1, false, MouseEvent.BUTTON1); } } action.actionPerformed( AnActionEvent.createFromAnAction(action, event, ActionPlaces.WELCOME_SCREEN, DataManager.getInstance().getDataContext())); } else if (e.getKeyCode() == prevKeyCode) { focusPrev(parentContainer, comp); } else if (e.getKeyCode() == nextKeyCode) { focusNext(parentContainer, comp); } else if (e.getKeyCode() == KeyEvent.VK_LEFT) { if (focusedOnLeft != null) { IdeFocusManager.getGlobalInstance() .doWhenFocusSettlesDown(() -> IdeFocusManager.getGlobalInstance().requestFocus(focusedOnLeft, true)); } else { focusPrev(parentContainer, comp); } } else if (e.getKeyCode() == KeyEvent.VK_RIGHT) { focusNext(parentContainer, comp); } }