Skip to main content

mapper library

The mapper library provides essential functionalities required for utilizing fsmapper. It includes defining Event-Action mappings, opening devices, constructing elements of virtual instrument panels, as well as emulating joysticks and keyboards.

Variables

NameDescription
mapper.script_pathPath of the configuration script
mapper.script_dirFolder path where the configuration script is located
mapper.profile_dirUser profile folder path
mapper.saved_games_dirSaved games folder path
mapper.eventsSystem event table

Functions

NameDescription
mapper.print()Print a message
mapper.abort()Abort processing
mapper.delay()Deferred function execution
mapper.register_event()Register an event
mapper.unregister_event()Unregister an event
mapper.get_event_name()Get the name assinged to an event
mapper.raise_event()Raise an event
mapper.set_primary_mappings()Set primary Event-Action mapping definitions
mapper.add_primary_mappings()Add primary Event-Action mapping definitions
mapper.set_secondary_mappings()Set secondary Event-Action mapping definitions
mapper.add_secondary_mappings()Add secondary Event-Action mapping definitions
mapper.device()Open a device
mapper.viewport()Register a viewport
mapper.view_elements.operable_area()Create a OperableArea view element object
mapper.view_elements.canvas()Create a Canvas view element object
mapper.view_elements.captured_window()Create a CapturedWindow view element object
mapper.window_image_streamer()Create a window image streamer object
mapper.start_viewports()Start all viewports
mapper.stop_viewports()Stop all viewports
mapper.reset_viewports()Stop all viewports then unregister all viewports
mapper.virtual_joystick()Create vJoy feeder object
mapper.keystroke()Create Keystroke object for keybord emulation
mapper.enumerate_display_info()Enumerate information for all displays

Objects

NameDescription
DeviceObject representing a device
ViewportObject representing a viewport
OperableAreaObject Representing a operable area on a view
CanvasObject Representing a drawable area on a view
CapturedWindowObject representing a captured window placed on a view
WindowImageStreamerObject for capturing window images in real-time
CapturedImageObject for displaying images captured by the WindowImageStreamer on the view
vJoyObject representing a virtual joystick
vJoyUnitObject representing an operable unit of the virtual joystick
KeystrokeObject Representing a keystroke sequence to emulate keyboard

User Defined Functions

NameDescription
ACTION()Implementation of an action by user
RENDER()Implementation of a renderer for a Canvas view element by user