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.
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Level 7

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" />

2) This component placed into Scene (XML).

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

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


<MenuBar id="menuBar" />


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

I tried to show what i need on the screens:

Sincerely, Sergey Shoshin, software developer.
0 Kudos