Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
New Developer
Posts: 19
Registered: ‎05-13-2009
My Device: Not Specified

How to capture shift key presses

developing in 4.6.1 on the 8900 simulator, i find that pressing the left and right shift keys do not trigger keyControl(), keyChar(), keyUp(), OR keyDown(). The forum solution of

 

public boolean keyDown(int keyCode, int time)
 {
        if(Keypad.key(keyCode) == Keypad.KEY_SHIFT_RIGHT ||
                Keypad.key(keyCode) == Keypad.KEY_SHIFT_LEFT)
        {

           ....

        }

}

 

doesnt work. Ideas? (All other keys trigger at least one of these methods)

Developer
Posts: 1,055
Registered: ‎01-25-2009
My Device: BlackBerry Bold 9650/BlackBerry Torch 9800

Re: How to capture shift key presses

Try this knowledgebase article:

 

http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800332/832062/How_To_...

Jerome Carty - Follow jcarty on Twitter@jcarty | #webworks-dev / #BlackberryDev on irc.freenode.net | My Apps
Click "Accept as Solution" if post solved your original issue.. Give like/thumbs up if you feel post is helpful