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

Posts: 112
Registered: ‎07-19-2009
My Device: Not Specified
Accepted Solution


I'm using a BlackBerry 8300 simulator and want my application to stroke a key when the app opens but it doesn't work out. The code I'm using is...
   KeyCodeEvent eKeyDown = new KeyCodeEvent(KeyCodeEvent.KEY_DOWN, Characters.DIGIT_EIGHT, KeypadListener.STATUS_NOT_FROM_KEYPAD);
KeyCodeEvent eKeyUp = new KeyCodeEvent(KeyCodeEvent.KEY_UP, Characters.DIGIT_EIGHT, KeypadListener.STATUS_NOT_FROM_KEYPAD);
Posts: 905
Registered: ‎02-07-2009
My Device: BlackBerry Torch 9800
My Carrier: Globe Telecom

Re: KeyCodeEvent

are you refering to EventInjector? 


try like this:

EventInjector.KeyCodeEvent pressEsc =

new EventInjector.KeyCodeEvent(EventInjector.KeyCodeEvent.KEY_DOWN, (char)Keypad.KEY_END,

                                KeypadListener.STATUS_NOT_FROM_KEYPAD, 3000); 



Posts: 112
Registered: ‎07-19-2009
My Device: Not Specified

Re: KeyCodeEvent

Thanks for the help.

Can you please let me know about USB ports


I want to establish a communication channel between a BlackBerry handset and a PC via a USB cable. In other words, I want the BlackBerry client to listen (read) every text that the PC (server) sends. Please let know the process. I tried using the sample program USBDemo, that's  shipped with the Blackberry JDE. But it runs the same way on the BlackBerry handset as in the simulator. How do I know if my handset and PC are connected and the handset is ready to listen.