How can i read mouse coordinates from /dev/input/mice ?

Dec 14, 2005 2 Replies

Hi Guys,



I am trying to read the coordinates from a mouse on an embedded linux board. I can see data flowing in /dev/input/mice (and also /mouse0) but i cannot seem to find any meaningful data in the data returned :-(



Can anyone help ?



Are there a struct to be filled and read from ?



B.Rgds. Peter Denmark



A mouse does not report "coordinates" as such. It reports the amount of movement since the last reading. It only reports the delta.

Take a look at the following web site for more info.

formatting link

Hi Bob!

Thank you very much, the link seems to point to just what i needed of information ;o) Have a nice X-mas and a happy new year !

- Peter

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required