@Override
				public void windowDeactivated( WindowEvent e ) {
					altPressedEventCount = 0;
					selectMenuOnAltReleased = false;

					// use invokeLater() to avoid that the listener is removed
					// while the listener queue is iterated to fire this event
					EventQueue.invokeLater( () -> {
						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