I did find this [0]. I don't know what state its in for compilating/running ext. But it might give you a good starting point.[0] https://github.com/pythoneer/XInputSimulator
ooh there's some nice code for Linux in there! The Windows is only half implemented though... but this combined with my Windows code should get you enough example to write a cross-platform thing if you need it.