@Override
	public boolean postProcessKeyEvent( KeyEvent e ) {
		int keyCode = e.getKeyCode();
		if( SystemInfo.isMacOS ) {
			// Ctrl+Alt keys must be pressed on Mac
			if( keyCode == KeyEvent.VK_CONTROL || keyCode == KeyEvent.VK_ALT )
				showMnemonics( shouldShowMnemonics( e ) && e.isControlDown() && e.isAltDown(), e.getComponent() );
		} else {
			// Alt key must be pressed on Windows and Linux
			if( SystemInfo.isWindows )
				return processKeyEventOnWindows( e );

			if( keyCode == KeyEvent.VK_ALT )
				showMnemonics( shouldShowMnemonics( e ), e.getComponent() );
		}

		return false;
	}
Show/hide mnemonics.

@author Karl Tauber
flatlaf-core/src/main/java/com/formdev/flatlaf/MnemonicHandler.java