Need help in handling EVT_KEY and EVT_KEY_PRESS | developer.brewmp.com Need help in handling EVT_KEY and EVT_KEY_PRESS | developer.brewmp.com

Developer

Need help in handling EVT_KEY and EVT_KEY_PRESS

Forums:

Hi Everyone,

I have created one constrain container and added a vertical list container.
Also the vertical list container has one imagestaic widget inserted.

I want to handle AVK_SELECT button on imagestatic widget to increase the border.
When I press SELECT key on simulator I get KEY_PRESS_EVENT on all the 3 widgets which I have created(constrain container,vertical list and imagestatic widget).

I read in BREW documentation about the sequence of events that BREW sends to application when any key is pressed and it has been advised to handle the action in EVT_KEY case.

But I get EVT_KEY event only on my constraint container and the vertical list.EVT_KEY event never reaches to imagestatic widget where I handle my action.

Is there anything wrong in this.I need to some clarification on this.
why EVENT_KEY_PRESS gets generated for all 3 widgets and EVT_KEY only for 2.

Thank you
-Pradnya

Hi,
The list container is working as designed: it does not pass EVT_KEY events to its focused item.
When the list container receives the AVK_SELECT key, it calls IWidget_SetSelected() on the focused widget. Instead of waiting for the AVK_SELECT key event, you can use the selection of the widget as the trigger for your code.
Thanks,
Sam.

Hi,
The list container is working as designed: it does not pass EVT_KEY events to its focused item.
When the list container receives the AVK_SELECT key, it calls IWidget_SetSelected() on the focused widget. Instead of waiting for the AVK_SELECT key event, you can use the selection of the widget as the trigger for your code.
Thanks,
Sam.