private boolean handleRightOrLeftKeyPressed(@NotNull KeyEvent keyEvent, boolean isRightKey) {
      ActionItem item = ObjectUtils.tryCast(getList().getSelectedValue(), ActionItem.class);
      ActionPopupStep step = ObjectUtils.tryCast(getListStep(), ActionPopupStep.class);
      if (step != null && item != null && step.isSelectable(item) &&
          item.getKeepPopupOnPerform() != KeepPopupOnPerform.Never && item.getAction() instanceof ToggleAction toggle) {
        AnActionEvent event = step.createAnActionEvent(toggle, keyEvent);
        ActionUtil.performDumbAwareWithCallbacks(toggle, event, () -> {
          toggle.setSelected(event, isRightKey);
        });
        step.updateStepItems(getList());
        return true;
      }
      return false;
    }
private boolean handleRightOrLeftKeyPressed(@NotNull KeyEvent keyEvent, boolean isRightKey)