Class

base-modules/key/BrowserTVKey

base-modules/key/BrowserTVKey()

Constructor

# new base-modules/key/BrowserTVKey()

Implements:
  • interfaces/AbstractKey Extended AbstractKey to handle regular TV Key code. This class provides the basic feature on the browser platform to start with. A configuration option, `console.log.TVKey`, is used to control whether the key events and virtual key mapping should be outputted to console. The value is defaulted to `false`, which means the events and the mappings will not be logged to the console. See module:base/console for further details.

Methods

# static getKeyMapping() → {Object}

Return all key mapping of keyCode and charCode to keyboardVKey object from the browser TvKey.

return object of keyCode and charCode Object

Object

# static getMappedKey(evt) → {Object}

Get the mapped virtual key object from the native KeyboardEvent.

Parameters:
Name Type Description
evt Object

Native KeyboardEvent received.

return the object from module:device/key/keyboardVKey or module:device/key/vKey.

Object

# static initKeyHandling()

Initializes the key handling logic for the device. Keydown, keypress and keyup events will all be bound to the same handler. The listeners will have useCapture flag set to true to allow programmatically dispatch the native key events to the browser if an XDK flag is turned on.

base-modules/key/BrowserTVKey()

Constructor

# new base-modules/key/BrowserTVKey()

Methods

# static getKeyMapping() → {Object}

Return all key mapping of keyCode and charCode to keyboardVKey object from the browser TvKey.

return object of keyCode and charCode Object

Object

# static getMappedKey(evt) → {Object}

Get the mapped virtual key object from the native KeyboardEvent.

Parameters:
Name Type Description
evt Object

Native KeyboardEvent received.

return the object from module:device/key/keyboardVKey or module:device/key/vKey.

Object

# static initKeyHandling()

Initializes the key handling logic for the device. Keydown, keypress and keyup events will all be bound to the same handler. The listeners will have useCapture flag set to true to allow programmatically dispatch the native key events to the browser if an XDK flag is turned on.