Quantcast
Channel: xda-developers - Android Software and Hacking General [Developers Only]
Viewing all articles
Browse latest Browse all 3614

[Q] Hook and substitute hardware keyboard events

$
0
0
Hi all,

Few days ago I'v repaired HTC Desire Z with Russian keyboard and installed CM10.2 onto it. And of course I want to have working Russian keyboard layout.

Unfortunately only official firmware support it, and problem cannot be solved by editing layout tables because for some buttons there is two Cyrillic letters on one button. There is ruKeyboard application to fix it, but it closed source, so it doesn't acceptable for me.

So, I'm going to develop my application for it (open source, of course) and want to ask some questions... I have a lot of development experience (especially low level, e.g. drivers, MCU's firmware and so on), but never programmed for Android (however I know Java in some degree).

Of course, I can path android kernel/sources to get my task done, but I suppose that it's a bad idea, because I'll need to port changes to new versions and so on. So, I want to process keyboard events from userspace.

My question: Is it possible to hook all hardware keyboard events (i.e. scancodes, not characters) from userspace, remove them from message queue, and produce new events? I know that producing new events is possible, but what about hooking it (like MS Windows event hooks?). Can you give me a hint (maybe link to example or API, suitable for it)?

Thank you in advance.

Viewing all articles
Browse latest Browse all 3614

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>