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>

  1. 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:

[upload|QS9SAmr7MuXt9U4phWtp1A==]

[upload|/vTCUtrL4B/YyoL7lPUCDA==]