@Override
  public void handleKeyEvent(@NotNull KeyEvent e) {
    for (Consumer<? super KeyEvent> preKeyEventConsumer : myPreKeyEventConsumers) {
      preKeyEventConsumer.accept(e);
    }
    myEscapeKeyListener.handleKeyEvent(e);
    if (!e.isConsumed()) {
      super.handleKeyEvent(e);
    }
  }
@Override
  public void handleKeyEvent(@NotNull KeyEvent e)