top

TVKeyValue Object

Published 2014-10-28 | (Compatible with SDK 2.5,3.5,4.5,5.0,5.1 and 2011,2012,2013,2014 models)

Defines TV key code.

TVKeyValue is an object that defines the TV key code.

TVKeyValue  
Library path $MANAGER_WIDGET/Common/API/TVKeyValue.js
Syntax new Common.API.TVKeyValue()
Methods None
Parameter None
Return Value TVKeyValue object
Remarks

This object has a key code which the TV uses as a member variable, and identifies the remote control keys pressed by the user by referring to these member variables.

Since Samsung Smart TV version 2.265

Members

KEY_TOOLS

KEY_MUTE

KEY_RETURN

KEY_UP

KEY_DOWN

KEY_LEFT

KEY_RIGHT

KEY_WHEELDOWN

KEY_WHEELUP

KEY_ENTER

KEY_INFO

KEY_EXIT

KEY_RED

KEY_GREEN

KEY_YELLOW

KEY_BLUE

KEY_INFOLINK

KEY_RW

KEY_PAUSE

KEY_FF

KEY_PLAY

KEY_STOP

KEY_1

KEY_2

KEY_3

KEY_4

KEY_5

KEY_6

KEY_7

KEY_8

KEY_9

KEY_0

KEY_EMPTY

KEY_PRECH

KEY_SOURCE

KEY_CHLIST

KEY_MENU

KEY_WLINK

KEY_CC

KEY_CONTENT

KEY_FAVCH

KEY_REC

KEY_EMODE

KEY_DMA

KEY_PANEL_CH_UP

KEY_PANEL_CH_DOWN

KEY_PANEL_VOL_UP

KEY_PANEL_VOL_DOWN

KEY_PANEL_ENTER

KEY_PANEL_SOURCE

KEY_PANEL_MENU

KEY_PANEL_POWER

Example
var tvKey = new Common.API.TVKeyValue();

switch (KEY_CODE) {
    case tvKey.KEY_LEFT:
       // do something
       break;
   case tvKey.KEY_RIGHT:
       // do something
       break;
   default:
       break;
}