Operation logic of the listbox when using hardware buttons. #580
-
|
I'm using three hardware buttons (prev, select, and next) to control my device. On the screen, there are several buttons and a listbox used to display a list of files. I want to use prev or next to navigate/select files, and press select to open one. The default logic is that I first need to navigate to the listbox and press select to give it focus before I can select an item. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
|
HI @goddade -- It has been quite some time since I have used the hardware button navigation, but if I recall correctly, you should be able to map a button to the GSLC_ACTION_SET_REL action to get it to step through the listbox that received focus through the SELECT action. If you could allocate a specific button to increment the listbox selection, then you can assign it like this: If you have already used up all of your buttons in existing assignments, then you could assign the listbox navigation to a long-press event like this: In the above example, the ACTION_SET_REL +1 should cause the focused listbox to advance its internal selection value by 1 (ie. relative position change). Have a look at the Hope that helps! |
Beta Was this translation helpful? Give feedback.
-
|
I think the operation logic of the listbox very strange. In a UI : When the `btn is selected, I press Then pressing Pressing "select" should trigger the listbox's touch_in event. When item0 is selected, I press "prev", it should directly select the "btn". |
Beta Was this translation helpful? Give feedback.
Hi @goddade -- apologies for the delay as I was out of town for some time. The following are some thoughts from what I recall of this portion of the implementation.
What you say makes sense for your example -- it would be convenient to have the next/prev controls advance through the elements on the page, and then descend into the compound listbox element.
As you have seen, the navigation is currently only active at either the page level, or within a compound element (like the listbox or keypad). Selecting a compound element at the page level (that is "editable") starts us to navigate within the compound element.
An alternate approach would have been to flatten all elements from a navigati…