The fsEventsRegisterKeyEventHandler function can be used to register a Key Event handler which will receive all Key Events raised by the simulation.

 

Syntax
void fsEventsRegisterKeyEventHandler(
    FsEventsKeyEventHandler handler,
    void* userParam
);

 

Parameters
ParametersDescription
handlerThe callback that will be called each time a Key Event is raised by the simulation.
userParamThe pointer on user data that will be sent to the handler each time it will be called

 

Return Values

The function has no return value.

 

Example
void EventHandler(FsEventId id, FsVarParamArray* params, void* userParams)
{
    ...
}
DATA* userData = new DATA();
fsRegisterKeyEventHandler(EventHandler, userData);