Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
dreamer2057
Channel Surfer

Management of keys handling in components

Hello! How I can deal with keys handling.

1) I have custom component which will be repeated in different scenes. This component contains personal "onKeyEvent" logic (moving selection, open/close animation)

<component name="MenuBar" extends="Group" >
<script type="text/brightscript" uri="pkg:/components/Controls/Menu/MenuBar.brs" />
<children>
(Items)
(Animation)
</children>
</component>

2) This component placed into Scene (XML).

<component name="epgGridScene" extends="Scene">

<script type="text/brightscript" uri="pkg:/components/Scenes/Guide/EpgGridScene.brs" />

<children>

<MenuBar id="menuBar" />

</children>
</component>


Scene and component have own keyEvents. How i can switch between this two elements.

I tried to show what i need on the screens:

1)
2)
Sincerely, Sergey Shoshin, software developer.
0 Kudos
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.