Roku Developer Program

Developers and content creators—a complete solution for growing an audience directly.
cancel
Showing results for 
Search instead for 
Did you mean: 
georgejecook
Level 7

prevent rowlist from wrapping on press key left, or intercept key presses.

Hi, I want the feature of a rowlist where by the focus is fixed; but I want the left keypress on item zero to move focus OUT of the rowlist to the search box control

I can't find a way todo this, as the rowlist captures all the control events - 
I've subclassed the rowlist; but overrding the key handling code, works; but then causes the list to scroll uncontrollably

any one got any ideas?
George Cook
https://linkedin.com/in/georgejecook/
Roku developers slack group (http://tiny.cc/nrdf0y) : georgejecook

Contact me on roku developer slack group, or via pm to discuss consultancy/work opportunities/rooibos unit testing framework
0 Kudos
4 Replies
joetesta
Level 10

Re: prevent rowlist from wrapping on press key left, or intercept key presses.

put an onKeyHandler in the parent (of the rowlist) component.
I forget offhand if it will receive press = true or false in this case, but you can handle it by detecting the rowlist focus position (rowItemFocused) and if it's zero, do what you want.
aspiring
0 Kudos
georgejecook
Level 7

Re: prevent rowlist from wrapping on press key left, or intercept key presses.

that don't work - it swallows it up - I never see it. rowlist also doesn't correctly handle focus events either..

I extended the rowlist too; but to no avail - I can intercept the relevant keypress; and change focus; but then the rowlist starts scrolling on it's own accord. It's most irksome.

thanks for your help though Smiley Wink
George Cook
https://linkedin.com/in/georgejecook/
Roku developers slack group (http://tiny.cc/nrdf0y) : georgejecook

Contact me on roku developer slack group, or via pm to discuss consultancy/work opportunities/rooibos unit testing framework
0 Kudos
joetesta
Level 10

Re: prevent rowlist from wrapping on press key left, or intercept key presses.

if it's not in scrolling mode I believe the keypress bubbles up to the parent component, but it's been a while.  At my prior job we created custom replacements for Rowlist to get it to do what we needed; that was a multi-week effort.
aspiring
0 Kudos
georgejecook
Level 7

Re: prevent rowlist from wrapping on press key left, or intercept key presses.

that's what I figured - thanks for chipping in.

I might push to deprioritize that feature.
George Cook
https://linkedin.com/in/georgejecook/
Roku developers slack group (http://tiny.cc/nrdf0y) : georgejecook

Contact me on roku developer slack group, or via pm to discuss consultancy/work opportunities/rooibos unit testing framework
0 Kudos