Version: 1.2.8.0
Frequency: Consistently
Severity: High
Context: Custom standalone WASM module built for MSFS 2020 (SDK v.0.24.3) installed in MSFS 2024 Community folder.
Similar MSFS 2020 issue: None, works as expected in 2020.
Bug description:
Invoking Gauge API trigger_key_event_EX1()
doesn’t seem to have any effect the first time after Sim has been started.
Every subsequent invocation works as expected. Even if the WASM module is reloaded (eg. rebuilt from project manager). Seems specifically after first start of simulator itself.
Repro steps:
- Load a standalone WASM module which calls
trigger_key_event_EX1(65752, 0, 0, 0, 0, 0)
(on demand somehow or twice after a flight has started). This ID is for thePARKING_BRAKES
event (toggle parking brakes). - Load a freelight with a stock Cessna 172, starting on a runway.
- Either trigger the
trigger_key_event_EX1()
call in the WASM module somehow or wait for it to trigger twice. - Observe that the first call seems to be ignored, meaning the parking brake state doesn’t change. Subsequent calls work fine.
OR
- Download/install
WASimModule
andWASimUI
assets from WASimCommander Releases - Start simulator, load into a flight with C172 on runway, as above.
- Start WASimUI, hit the “Connect” button at top left, then use “Key Events” section to send a
PARKING_BRAKES
event.
This ends up invokingvoid sendKeyEvent()
in the module’s code (which then usestrigger_key_event_EX1()
).