Question

I'm currently attempting to write a program that needs to read /dev/input/mice in order to gain mouse input. My only problem is that when I read from /dev/input/mice all I get is gibberish. Online (Google), I found very few helpful webpages. I've attempted to use OD's output, but thats even worse than just trying to read from the file. I've attempted to use third-party libraries, but as I am working with an ARM architecture, many libraries will not run or compile. Does anyone know what format this data is in, and how to parse this data into understandable data.

Libraries I've tried to Use:

https://code.google.com/p/jnativehook/ (Won't recompile on ARM)

http://sdljava.sourceforge.net/ (Can't even get this one to compile x86!)

EDIT: I'm using a raspberry pi, with no X server installed. (NO AWT)

Was it helpful?

Solution

Thanks to @JustinB for his answer in the comments, just thought I should put it here for others to see:

JustinB: "/dev/input/mice outputs 3 bytes, The first byte is the button data, the next two are x and y. Its not java code, but you might find this or this helpful "

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top