如何获得通过黑莓键preSS文本 [英] How to get text through key press in Blackberry

查看:199
本文介绍了如何获得通过黑莓键preSS文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要在黑莓键preSS的情况下拿到钥匙的文本。这种情况发生在用户$ P $以输入文本psses从键盘的键。这怎么可能?

I need to get the text of the keys at the event of key press in Blackberry. This happens when the user presses a key from the the keypad in order to type text. How is that possible?

推荐答案

这可以帮助你:

protected boolean keyChar(char ch, int status, int time)
{
    if(ch == Characters.ESCAPE || ch == Characters.ENTER)
    {
        //Nothing to do;
    }
    else
    {
        pressedKey=pressedKey+ch;
    }
    return super.keyChar(ch, status, time);
}

然后你可以在 pressedKey值(这是你必须先声明它一个字符串变量)。

Then you can get the values in pressedKey(it is a String variable you have to declare it first).

这篇关于如何获得通过黑莓键preSS文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆