• Quick Start
  • Booting
  • Platform
  • Portals
  • References
    • API Reference TOI3
    • IIP Reference
  • Resources
ARRIS Enterprises, Inc. Confidential Information

KreaTvInput Configuration

A key map provides support for a keyboard of a particular language, connected via USB. It does not affect the remote control.

How to install key maps in the set-top-box

A KreaTV boot image contains only those key maps specified in the configuration when the bootimage was built. You can use kreatv-option-input-keymaps to choose which keymaps are installed in the STB:


kreatv-option-input-keymaps:names=pc-ar;pc-en

The example above installs two key maps: pc-ar and pc-en in the boot image. The STB will take the first one in the list, pc-ar in this case, as the default one.

How to change the key map at run time

To change the key map at run time, you just need to write a new value to the CFG_INPUT_KEYMAP platform object.


changeKeymap: function() {
  // Switch to pc-ar key map
  var objects = [];
  objects.push({"name": "cfg.input.keymap",
                "value": "pc-ar"});

  toi.informationService.set(
    objects, toi.consts.ToiInformationService.STORAGE_PERMANENT);
}

Change Default Key Mapping

The default key code of remote control to key identifier translation described in previous paragraph can be changed by setting the 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.

If you are 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.

5.0.1

Copyright (c) 2016 ARRIS Enterprises, LLC. All Rights Reserved. ARRIS Enterprises, LLC. Confidential Information.