roUniversalControlEvent

The roScreen object sends the roUniversalControlEvent with the following related methods. If an app constrains the events processed to just the roUniversalControlEvent, the app will work with any controller. The GetID(), GetChar(), GetKey(), and IsPress() methods can be used instead of parsing the GetInt() return value to more effectively distinguish between remote control and keyboard key presses, and the key press and release events.

Supported methods

GetInt() as Integer

Returns an integer representing pressed or released keys on the remote. This table can be accessed at runtime by calling bslCore.brs: bslUniversalControlEventCodes():

ButtonWhen PressedWhen Released
Back0100
Up2102
Down3103
Left4104
Right5105
Select6106
Instant Replay7107
Rewind8108
Fast Forward9109
Info10110
Play13113

GetKey() as Integer

Returns the ID of the remote button that generated an event.

GetRemoteID() as String

Returns an identifier associated with the type and ID of the remote control that generated the event. For example, if multiple wireless remotes are paired, this may be used to distinguish the event sources. Some remote controls, such as IR remotes, can not be distinguished using this API.

GetID() as Integer

Returns the ID of the remote button or character value represented by the event. Values 0x20..0x10FFFF represent a Unicode character value. Other values represent a remote button ID. GetID() returns the same value for a release event as for the press event.

IsPress() as Boolean

Checks whether a press event has occurred. This method returns true if a press event has occurred; otherwise, it returns false.

GetChar() as Integer

Returns the Unicode character value generated by a keyboard key press event.