Skip to main content

mapper.events

mapper.events

This variable refers to a table held system event IDs.

Type

Associative array table with the following keys.

KeyTypeDescription
change_aircraftnumberThe event ID for the event that occurs when fsmapper connects to the flight simulator or the connection is closed, or when the selected aircraft changes.
The event value for this event is a associative array table that holds the simulator type and aircraft name. For details, refer to the SimAircraft Table.

Event Value Types

SimAircraft Table

The event value for change_aircraft event is an associative array table with the following keys.

KeyTypeDescription
sim_typestringThe type of flight simulator that fsmapper is connected to. If the connection to the flight simulator is lost, this will be set to nil. You can interact with the flight simulator using the same functions as long as this value remains the same.
One of the following strings will be set.

  • msfs : Microsoft Flight Simulator or SimConnect-compatible simulator
  • dcs : Eagle Dynamics DCS World
sim_detailstringMore detailed information about the connected flight simulator than sim_type. One of the following strings will be set.

  • fsx: Microsoft Flight Simulator X
  • fs2020: Microsoft Flight Simulator 2020
  • fs2024: Microsoft Flight Simulator 2024
  • simconnect : Other SimConnect-compatible simulators not listed above
  • dcs : Eagle Dynamics DCS World
aircraftstringThe name of the aircraft the player is piloting.
hoststringSame as sim_detail. This field is for compatibility with previous versions of fsmapper.

See Also