[missionNamespace, "SpectrumAnalyzerClosed", { systemChat "closed" }] call BIS_fnc_addScriptedEventHandler;
Run the code above
Switch to the spectrum analyzer and right click to open it's display
Press 1 to switch to primary
Observe that SpectrumAnalyzerClosed is not fired and the action menu remains hidden