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

Reply
New Contributor
shahrouz
Posts: 5
Registered: ‎11-20-2012
My Device: Blackberry 10 Dev alpha
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
yohan1234
Posts: 25
Registered: ‎11-21-2012
My Device: The alpha device

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
borceg
Posts: 671
Registered: ‎03-21-2012
My Device: BlackBerry PlayBook 16GB

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
shahrouz
Posts: 5
Registered: ‎11-20-2012
My Device: Blackberry 10 Dev alpha

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
BGmot
Posts: 1,068
Registered: ‎11-24-2011
My Device: PlayBook

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.