I want to create a C program that accepts input from a joypad (/dev/input/js0), processes it, and then sends it to a fake device file (character or block) labeled as a keyboard (oh, and what is the device file for a keyboard?. I would like to know if it is possible to do this, and if so, how.
|
|
|||||||||||||
|
|
Look closely at an excerpt from an
The two numbers after the group ID but before the date are the device file's major and minor numbers. This is basically the "kind" of device it is. 8 in this case is a SCSI (or emulated SCSI) disk drive. http://lxr.linux.no/linux/Documentation/devices.txt is a somewhat not-so-recent list of all the major and minor numbers. Not sure of the official location of the latest version of the list. So anyway, these files are created with the
If you just want a fake device file and don't care what happens to the data you send to it, there's always |
|||
|
|
