public static @Nullable Component getClickSourceFromLastInputEvent() {
    var event = IdeEventQueue.getInstance().getTrueCurrentEvent();
    if (event instanceof MouseEvent mouseEvent) {
      return SwingUtilities.getDeepestComponentAt(mouseEvent.getComponent(), mouseEvent.getX(), mouseEvent.getY());
    }
    if (event instanceof KeyEvent keyEvent) {
      return keyEvent.getComponent();
    }
    return null;
  }
public static @Nullable Component getClickSourceFromLastInputEvent()