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" FAST_FORWARD "MediaForward" 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.
The default key code of remote control to key identifier translation described in previous paragraph can be changed by setting portal application parameter "key_binding_map". This parameter specifies a key code to key identity mapping file, referring to the IIP document of application "kreatv-app-ekioh-portal" and "kreatv-app-webkit-portal" for details.
Note! When setting the "key_binding_map" parameter for the portal application IIP, the key identifier of class "KeyboardEvent" in ECMAScript needs to be adjusted accordingly. E.g. when the teletext remote control button is set to use the new identifier "Text", which is done by specifying key map item "<key code="0xe0111" value="Text"/>" in the key mapping file, then the script code in the portal application should be changed to 'document.addEventListener("Text", onKeyPressed, false);' accordingly.