开发者

Catch keypress of special characters with android

how can I catch a keypress of all characters that are on sw keyboards? Overriding onKeyDown() in the activity works only for standard ASCII characters like a-z0-9-!/... but doesn't work with all the UTF8 chars like ščřž (in that case this method开发者_如何学C is not called at all) I know the KeyEvent has a method getUnicodeChar(), which returns the unicode character that the key would produce. But I dont know how to get that KeyEvent when onKeyDown() is not called.


I have not tried it but there is a method called dispatchKeyEvent(KeyEvent event). I hope it will surely meet ur needs.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜