private void setupHomeCtrlKey(JComponent component) {
    @NlsSafe
    String actionName = "FCB_HOME_CTRL";
    Action action = new AbstractAction(actionName) {

      private static final long serialVersionUID = 3916227645612863334L;

      @Override
      public void actionPerformed(ActionEvent e) {

        // if focus is on the popup: select the very first item on the
        // popup, changing probably from the choices list to the history
        // list;  if the item is already on the very first element, or
        // the focus is on the text field, move the caret home
        if (!popup.isPopupFocused() || !popup.selectFirst(true)) {
          if (e.getSource() instanceof JTextField textField) {
            textField.setCaretPosition(0);
          }
        }
      }
    };
    component.getActionMap().put(actionName, action);
    component.getInputMap(JComponent.WHEN_FOCUSED)
      .put(KeyStroke.getKeyStroke(KeyEvent.VK_HOME, InputEvent.CTRL_MASK),
           actionName);
  }
private void setupHomeCtrlKey(JComponent component)