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

Web and WebWorks Development

Reply
New Developer
Posts: 2
Registered: ‎01-13-2009
My Device: Not Specified

Capture BB keys using JavaScript

Hi All,

I want to call one function when the numeric key "4" is clicked and another function when the numeric key "6" is clicked.

But in BB's those keys are assigned functionalities by default such as browser back and forward, save, and find etc. So is it possible to restrict default events and control those key movements using javascript ? Thanks in advance.

 

Guru I
Posts: 19,020
Registered: ‎07-29-2008
My Device: Passport, Playbook, 9320BES
My Carrier: Bouygues _ SFR

Re: Capture BB keys using JavaScript

you can't do that in every browser, since depending on the vendor, it does something else.
in Internet Explorer it does nothing
in Mozilla Firefox, it searches for the "4" character
in the blackberry browser it opens the search popup.



The search box on top-right of this page is your true friend, and the public Knowledge Base too:
Highlighted
New Developer
Posts: 2
Registered: ‎01-13-2009
My Device: Not Specified

Re: Capture BB keys using JavaScript

Thanks Xandrex. :-)