TorukMakto
TorukMakto

Reputation: 2088

Parse dev/input/event touch events

I am able to read events from dev/input/event* on a Android phone. However they are row codes in certain sequence like a touch event gives.

3 53 216

3 54 444

3 48 40

3 50 5

0 2 0

0 0 0

How do I parse them into meaningful events like touch at x and y coordinate? Or a long touch etc. And then I want to convert high level events back to similar codes to insert them in event queue.

Does any one have parser code in C/C++?

Any help greatly appreciated.

Upvotes: 2

Views: 5946

Answers (2)

Ron
Ron

Reputation: 21

u can see struct input_event defined in android kernel source code in external\kernel-headers\original\linux\Input.h

Upvotes: 2

Bojan Djurdjevic
Bojan Djurdjevic

Reputation: 31

I know this question is old, but here is the answer http://blog.softteco.com/2011/03/android-writing-events-low-level-touch.html

Upvotes: 0

Related Questions