Hey guys,
I was wondering if someone could help me out. I'm wondering if there is an equivalent input programming method in linux to the Raw Input programming in Windows.
I can look up resources and tutorials on whatever it is, I'm just not sure what I should be looking for.
Thanks for any help here..
Michael
Input device programming question
If you're dealing with usb devices and joysticks you could look at libusb, which provides userland access to the usb stack. I have some example code on my (dead) desktop which uses this to interface with a saitek X52 pro flight stick and set its LCD display and light colours.
Is this the sort of thing you need?
Is this the sort of thing you need?
Games/Projects Currently In Development:
Discord RPG Bot | D++ - The Lightweight C++ Discord API Library | TriviaBot Discord Trivia Bot
I don't know what Raw Input on Windows is, but of you want to bypass what the system provides for you and get input directly from the Linux kernel, your best bet is through the /dev/input nodes. Try the lsinput command to see what kinds of input devices you have available.
You can, of course, grab the source code to lsinput to see how it works.
You will need to run that command as root, because normal applications aren't supposed to be accessing the hardware directly like that.
You can, of course, grab the source code to lsinput to see how it works.
You will need to run that command as root, because normal applications aren't supposed to be accessing the hardware directly like that.
Stephen M. Webb
Professional Free Software Developer
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement