reading mouse device
hi,
I am new to linux .As part of my assignment ,I have been asked to read from the usb mouse pointing device. To begin with, I am not aware of the particular device in the "/dev/" directory that I need to do a read on.
I also tried to read from "/dev/input/mice" and found that it returned only 3 bytes. I went thru some of the resources onlince and found that it needs to retur struct input_event (defined in /include/linux/). So, I am not aware of how to interpret this 3 bytes that I get from reading.
Also, how can I know which device in the /dev directory represents the USB Mouse that I am using. Is there a general approach to this ?
So, I request you to kindly help me in this regard,
Thanks in advance.
Regards,
Daniel.
|