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

Native Development


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


Reply
New Contributor
Posts: 5
Registered: ‎11-20-2012
My Device: Blackberry 10 Dev alpha
My Carrier: 3
Accepted Solution

How do I prevent the virtual keyboard from appearing from gestures?

Hi,

 

How do I prevent the virtual keyboard from appearing by accident in my game? There is no reason for the player to use the keyboard during gameplay so I wish to disable it.

 

My current solution is to wait for to the NAVIGATOR_KEYBOARD_STATE with state NAVIGATOR_KEYBOARD_OPENING and calling virtualkeyboard_hide(). But that causes the keyboard to pop up a few pixels at the bottom before dissapearing again.

 

Is there a more elequent way of disabling the virtual keyboard gesture?

 

Thank you,

Shahrouz

Contributor
Posts: 25
Registered: ‎11-21-2012
My Device: The alpha device
My Carrier: Telenor

Re: How do I prevent the virtual keyboard from appearing from gestures?

Would also like to know this, is there perhaps something you can put in the bar descriptor xml?

Developer
Posts: 671
Registered: ‎03-21-2012
My Device: BlackBerry PlayBook 16GB
My Carrier: Vip

Re: How do I prevent the virtual keyboard from appearing from gestures?

Seems that direct way doesn't exit. But, check this http://developer.blackberry.com/native/beta/reference/com.qnx.doc.bps.lib_ref/com.qnx.doc.bps.lib_re...

According to docs, keypress events in the app trigger the virtual keyboard "Key press events come through Screen and Windowing API. For more information, see the Screen and Windowing API or bps/screen.h."
About disabling its gesture, simply write your own fake gesture handler, if it's possible to overwrite the default behavior.
New Contributor
Posts: 5
Registered: ‎11-20-2012
My Device: Blackberry 10 Dev alpha
My Carrier: 3

Re: How do I prevent the virtual keyboard from appearing from gestures?

Hi,

 

Is there an example where this is done? As I understand it there are more than 1 gesture triggering the virtual keyboard. Is there a way to get a exhaustive list for the gestures doing this?

 

Best,

Shahrouz

Developer
Posts: 1,068
Registered: ‎11-24-2011
My Device: PlayBook
My Carrier: x

Re: How do I prevent the virtual keyboard from appearing from gestures?

I am afraid it is not possible. If BlackBerry Advisor does not correct me don't waste your time on this. If a user swipes bottom left corner the keyboard will appear regardless of your app.