开发者

Is it possible to get the char through the key code in Lwuit?

I'm trying to find some way to get the char or its key thr开发者_如何学Goough an ActionEvent's KeyEvent. I don't even know in which class I could find such a method.

Actually I have some old code containing hundred of lines of code, where we could map keycodes to characters, but it's a real pain, since different devices and languages mean special cases. I really want to avoid that.

Regards.


Just cast the keyCode integer to a char to get the actual character value. For a keypad you will always get numbers and for a qwerty device you will get letters.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜