edwardaux
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-22-2018
01:21 AM
Focusing on a specific key in keyboard
We'd like to be able to set initial focus on a specific key in the Keyboard. I can't see any APIs that might offer that functionality.
I managed to be able to do it by using some extremely dodgy code that looks like:
However, this feels like the most brittle solution ever. If Roku ever change the implementation/view hierarchy, things will fall in a heap. Just wanted to check to see if there was a better way.
Cheers,
Craig
m.keyboard.getChild(0).getChild(0).jumpToItem = 16m.keyboard.getChild(0).getChild(0).jumpToItem = 16
I managed to be able to do it by using some extremely dodgy code that looks like:
m.keyboard.getChild(0).getChild(0).jumpToItem = 16
However, this feels like the most brittle solution ever. If Roku ever change the implementation/view hierarchy, things will fall in a heap. Just wanted to check to see if there was a better way.
Cheers,
Craig
m.keyboard.getChild(0).getChild(0).jumpToItem = 16m.keyboard.getChild(0).getChild(0).jumpToItem = 16
2 REPLIES 2
rftvaa
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-22-2018
03:15 AM
Re: Focusing on a specific key in keyboard
Hi, just replying to say that unfortunately I went with the same solution.
However, you can decrease the changes of getting issues in the future if you recursively explore m.keyboard's children and children's children, etc, looking for the VKBGrid component (which is currently the m.keyboard.getChild(0).getChild(0).subtype() ) and use .jumpToItem if you happen to find it.
However, you can decrease the changes of getting issues in the future if you recursively explore m.keyboard's children and children's children, etc, looking for the VKBGrid component (which is currently the m.keyboard.getChild(0).getChild(0).subtype() ) and use .jumpToItem if you happen to find it.
edwardaux
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-22-2018
02:36 PM
Re: Focusing on a specific key in keyboard
Cool, thanks. Nice to know I haven't missed something obvious.