public void onFrameSelectionKeyPressed(@NotNull Consumer<? super XStackFrame> handler) {
    myFramesList.addKeyListener(new KeyAdapter() {
      @Override
      public void keyPressed(KeyEvent e) {
        int key = e.getKeyCode();
        if (key == KeyEvent.VK_ENTER || key == KeyEvent.VK_SPACE || key == KeyEvent.VK_RIGHT) {
          handleFrameSelection();
          ApplicationManager.getApplication().invokeLater(() -> handler.accept(myFramesList.getSelectedFrame()));
        }
      }
    });
  }
public void onFrameSelectionKeyPressed(@NotNull Consumer<? super XStackFrame> handler)