LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   reading mouse device (https://www.linuxquestions.org/questions/linux-newbie-8/reading-mouse-device-615179/)

danielrex15 01-21-2008 08:23 AM

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.

acid_kewpie 01-21-2008 08:29 AM

Please post your thread in only one forum. Posting a single thread in the most relevant forum will make it easier for members to help you and will keep the discussion in one place. This thread is being closed because it is a duplicate.


All times are GMT -5. The time now is 04:53 PM.