setPanelFocus()
Description
Moves Roku focus into the panel. Use this function to programmatically transfer focus from your application to the Maestro panel.
Usage
m.lib.callFunc("setPanelFocus")
When to Use
Use this function when:
- User navigates to the panel using remote controls
- You want to programmatically focus the panel
- Transitioning from your app UI to the panel UI
Example
' Handle remote button press to open panel
sub onRemoteButtonPress(key as String)
if key = "options" then
' Show the panel
m.lib.showPanel = true
' Transfer focus to the panel
m.lib.callFunc("setPanelFocus")
end if
end sub
Best Practices
- Ensure the panel is visible before calling this function
- Use in conjunction with
showPanel = truewhen opening the panel - Consider user experience when transferring focus