How android translate kernel input eve nts to userland input eventsé”›

by ZaichengQi » Fri, 23 Oct 2009 11:38:44 GMT


Sponsored Links
 If I paste on the wrong group, please warn me.

Hello now learning how android handles linux input events from
kernel raw input events to the userland level KeyEvent and so on. And
I want to handle input events in native language. I've do some
experiments on handling events using NDK but the touch screen events
are very hard to handle(when I touch the screen, It generates a lot
of
kernel events).

I've read the eventhub class in framework base dir in the android
source repo. And I now I know how android collects linux kernel raw
events using eventhub class by reading from /dev/input/event* , but I
still have no idea how it translates these raw events into the
userland logic input events like KeyEvent. The file keyinput service
only wrappers eventhub to JNI functions but there are no translation.

So please give me some hints on the kernel event and userland event
translation process.

Thanks in advance.
--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. Application could not be installed on this phone?

On Mon, Oct 12, 2009 at 11:37 AM, Richard Schilling <




There is already a fair amount of stuff printed in the log when an install
fails (and also when it succeeds).

-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

--~--~---------~--~----~------------~-------~--~----~

2. How does Android decide if an Activity should be restarted after the Activity crashes?

does Android allow calling signal() to catch native code crashes? 
arranging for signal reception then communicating to the Java space 
that there's been a native library crash might be an option if so.






-- 
jason.vp.engineering.particle

--~--~---------~--~----~------------~-------~--~----~

3. Max app memory on large screen devices

4. How to check from the framework that ,the running application is downloaded from Market or not ?

5. Stuck in Mud Over GWT?

6. Best "Hello World" Map Tutorial/Application?

7. How to control the camera flash light on my Galaxy?