The key identifiers generated from key presses on the remote control and keyboard corresponds as far as possible to the list of Keyboard events and key identifiers as specified by W3C.
Numeric keys are generated from key presses on the remote control and keyboard as defined by W3C. The following JavaScript code can be used to create a mapping between these key codes and JavaScript variables
var KEY_0 = "U+0030"; var KEY_1 = "U+0031"; var KEY_2 = "U+0032"; var KEY_3 = "U+0033"; var KEY_4 = "U+0034"; var KEY_5 = "U+0035"; var KEY_6 = "U+0036"; var KEY_7 = "U+0037"; var KEY_8 = "U+0038"; var KEY_9 = "U+0039";
However, the remote control and keyboard have buttons that cannot be found on a regular PC keyboard. These buttons are translated by the driver to a series of key identifiers according to the table below.
Button Identifier ====== =========== STANDBY See note below INFO "Info" TV "TV" WWW "Web" VOD "VOD" TEXT "Teletext" (as by W3C) GUIDE "Guide" MOS "Mosaic" ZOOM "Zoom" (as by W3C) RED "Red" GREEN "Green" YELLOW "Yellow" BLUE "Blue" PORTAL "Portal" BACK "BrowserBack" (as by W3C) OK "Accept" (as by W3C) MENU "Menu" EXIT "Exit" LIST "List" ARROW_UP "Up" (as by W3C) ARROW_DOWN "Down" (as by W3C) ARROW_LEFT "Left" (as by W3C) ARROW_RIGHT "Right" (as by W3C) SCROLL_UP "ScrollUp" SCROLL_DOWN "ScrollDown" SCROLL_LEFT "ScrollLeft" SCROLL_RIGHT "ScrollRight" VOLUME_DOWN "VolumeDown" (as by W3C) VOLUME_UP "VolumeUp" (as by W3C) MUTE "VolumeMute" (as by W3C) P+ "ChannelUp" P- "ChannelDown" PLAY_PAUSE "MediaPlayPause" (as by W3C) REWIND "MediaRewind" (as by W3C) FAST_FORWARD "MediaForward" (as by W3C) NEXT "MediaNextTrack" (as by W3C) PREVIOUS "MediaPreviousTrack" (as by W3C) STOP "MediaStop" (as by W3C) RECORD "MediaRecord" CANCEL "U+0018" (as by W3C)
Note! STANDBY button key press (CTRL + "Esc") is handled by the platform and will never reach the portal, except for the modifier key "CTRL". To listen for standby events the portal needs to subscribe to the ToiInformationService::ON_OBJECTS_CHANGED event of "var.io.state" object.