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

Java Development

Reply
New Contributor
Posts: 7
Registered: ‎10-03-2008
My Device: Not Specified

New OS6 API KeyHandlerRegistry, what does it do?

[ Edited ]

Browsing through the new 6.0 docs I came across KeyHandlerRegistry, I thought great, this could be really useful.  I tried implementing it into one of my applications and wasn’t having much luck so I tested all the keys (from net.rim.device.api.ui.Keypad) with  isKeySupported().  This is what the results showed:

 

 

Supported KEY_BACKLIGHT: false
Supported KEY_BACKSPACE: false
Supported KEY_BACKWARD: false
Supported KEY_CAMERA_FOCUS: false
Supported KEY_CONVENIENCE_1: true
Supported KEY_CONVENIENCE_2: true
Supported KEY_DELETE: false
Supported KEY_END: false
Supported KEY_ENTER: false
Supported KEY_ESCAPE: false
Supported KEY_FORWARD: false
Supported KEY_LOCK: false
Supported KEY_MENU: false
Supported KEY_MIDDLE: true
Supported KEY_NEXT: false
Supported KEY_RIGHT_3: false
Supported KEY_SEND: false
Supported KEY_SHIFT_LEFT: false
Supported KEY_SHIFT_RIGHT: false
Supported KEY_SHIFT_X: false
Supported KEY_SPACE: false
Supported KEY_SPEAKERPHONE: false
Supported KEY_VOLUME_DOWN: false
Supported KEY_VOLUME_UP: false

 

 

 

So only the convenience keys and key middle which as far as I am aware hasn’t been used since RIM started using the trackball, maybe it is now mapped to another key?

 

So I might be missing the point of this API but I’m not sure I see its purpose.  The user can assign any application to the convenience key them self, so does anyone know what this API is useful for?

Developer
Posts: 516
Registered: ‎07-23-2010
My Device: 9900

Re: New OS6 API KeyHandlerRegistry, what does it do?

This class allows an application to register as a handler for global key events. A KeyListener added to an Application which has registered with this API will receive key events for a registered key regardless of what another application running in the foreground may do in terms of processing the event.

 

-- BlackBerry Javadocs

Highlighted
New Contributor
Posts: 7
Registered: ‎10-03-2008
My Device: Not Specified

Re: New OS6 API KeyHandlerRegistry, what does it do?

[ Edited ]

 


BB-Dude wrote:

This class allows an application to register as a handler for global key events. A KeyListener added to an Application which has registered with this API will receive key events for a registered key regardless of what another application running in the foreground may do in terms of processing the event.

 

-- BlackBerry Javadocs


Yes I understand what the API says, did you read my post at all?  My issue is not what the API doc says it does, but what it actually does.