开发者

Android: How to intercept keydown globally (on hardware keyboard)

Is there a possi开发者_如何转开发bility for an android app to run as a service in the background, intercept keydown events from the hardware keyboard and change behavior (i.e. the resulting character) in some special cases?

The idea in mind is to have sort of a keyboard layout fix, mainly making important special characters available using an alternative keymap instead of having to select from a huge grid on the touch screen. Sometimes, the default keymap of a mobile devices do not represent all important characters, even more when it comes to non-english languages.

Thanks for inspiration :) Peter

EDIT: additionally emphasized hardware


What you are describing is in fact not a service in background but replacing the keyboard app itself..take a look at the SWype app.

You do not have to create a service to do this as you want just the your own keyboard layout coming up when entering text, etc.

The sample of replacing a default app in the sdk is the homescreen but the keyboard app can be replaced as well..

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜