#Working with RCU input SceneGraph makes working with RCU events easier than ever. Currently in SDK1 you generally would have an event loop for a page and listen for RCU inputs - then check what item is focused before deciding what to do with the input. With SceneGraph you put the code directly on the component/node.
The function used for handling RCU input is function onKeyEvent(key as String, press as Boolean) as Boolean
.
The key
that is passed in will be one of these strings, representing an RCU input: back
, up
, down
, left
, right
, OK
, replay
, play
, rewind
, fastforward
or options
. Keys such as home
are handled by the Roku firmware and are unavailable to us. The press
parameter is true if the input was a press and false if it was a release. Allowing us to avoid apparent double clicks.
These key events can be bubbled up through the display hierarchy. If we do not wish the event to be bubbled up (because we have handled the event) we return true
. If however we didn't handle t