“Hey guys, today I’m going to outline my experience writing an interface for the USB joystick I have. My reason for starting this in the first place was a mix of curiosity and of my frustration with the lag or lack of functionality I’ve dealt with when trying to use a lot of other joystick mappers. A lot of games don’t support joysticks out of the box, so the most common method of dealing with this is, of course, to map the joystick actions to simulate key presses and mouse movements. So in the end, this isn’t so much a “driver” as a “converter”.
I’m going to assume you already have you joystick device up and working, and that you know the location of the device. For me, and likely a lot of you, the device will be located at /dev/input/js0. The exact model I used for this was the USB Logitech Dual Action, but the theory should apply to anyone looking to make their own as well.”
Fonte: http://www.stealth-x.com/programming/driver-writing-with-python.php
0sem comentários ainda