@Override
	public void stateChanged( ChangeEvent e ) {
		MenuElement[] selectedPath = MenuSelectionManager.defaultManager().getSelectedPath();
		if( selectedPath.length == 0 && altPressedEventCount == 0 ) {
			// hide mnemonics when menu selection was canceled
			showMnemonics( false, null );
		}
	}
Special Alt key behavior on Windows.

Press-and-release Alt key selects first menu (if available) and moves focus
temporary to menu bar. If menu bar has focus (some menu is selected),
pressing Alt key unselects menu and moves focus back to permanent focus owner.
flatlaf-core/src/main/java/com/formdev/flatlaf/MnemonicHandler.java