Reading USB mouse data in linux - somebody else C app and my python
July 26, 2009
Here is a slightly modified (added in hs and vs) c utility, and my python version. they will read the linux /dev/input/mouse data and convert it into status and x/y deltas
i noticed my python app seems quite different to the c app. not quite sure - default int() types in c must be signed, i dont know... my second two bytes for x,y have MSB set if they are negative, but this value is also set in bits 5 and 6 of byte 1 from what my python tells me..