Sending input events from native extension

I would like to use the SDL library for extended controller support (the vast majority of controllers supported by default, haptic feedback, other cool stuff). I really like the way that the input system works right now, and I would if possible like to send input messages so that users could use the system they are familiar with. Then the idea would be to provide lua bindings for communication back to the controller. So, boiling it down…

Is there a way to send input events (that get picked up by on_input) from a native extension?

The dmHid module is what you’re looking for. See also the Poco extension which uses it to simulate inputs:

2 Likes