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

New Developer
Posts: 17
Registered: ‎02-06-2009
My Device: Not Specified

How to show or hide Keyboard using code?

Dear Friends,


I have to show or hide keyboard through code. I am displaying one EditField on screen at that time Keyboard by default invoke, but my requirement is that when user want to type (fingure press on editbox) in Editbox at that time Keyboard must be enable(invoke).


OS that I use is : JDE 4.7

Simulator : BB Strom 9530 Verizon


Please help me to solve out this issue.


With Regards,


Please use plain text.
Posts: 293
Registered: ‎02-25-2009
My Device: Not Specified

Re: How to show or hide Keyboard using code?


VirtualKeyBoard v = screenObj.getVirtualKeyBoard();


Call below line when basicEditField gets Focus.




and call below line when BasicEditField loose focus.



Please use plain text.
Regular Contributor
Posts: 77
Registered: ‎11-03-2009
My Device: 9810 Torch
My Carrier: VIPnet

Re: How to show or hide Keyboard using code?

It should be enough just by invoking the following line:



Please use plain text.