ActionButtonWithText (@NotNull AnAction action, @NotNull String place, @NotNull Presentation presentation, Supplier<? extends @NotNull Dimension> minimumSize) { int mnemonic = action.getTemplatePresentation().getMnemonic(); ActionButtonWithText buttonWithText = new ActionButtonWithText(action, presentation, place, minimumSize); if (mnemonic != KeyEvent.VK_UNDEFINED) { buttonWithText.registerKeyboardAction(__ -> buttonWithText.click(), KeyStroke.getKeyStroke(mnemonic, InputEvent.ALT_DOWN_MASK), WHEN_IN_FOCUSED_WINDOW); } return buttonWithText; }