The Keyset class
Support in HbbTV
Available since: HbbTV 1.0 (ETSI TS 102 796 V1.1.1, OIPF DAE V1.1)
For terminals not making the VK_RECORD key event available to HbbTV® applications, the otherKeys and maximumOtherKeys properties are not included.
For terminals making the VK_RECORD key event available to HbbTV® applications, the otherKeys and maximumOtherKeys properties shall be supported and applications shall be able to request the VK_RECORD key event using them. The getKeyLabel method is not included. The icons returned by the getKeyIcon method shall be 32 x 32 pixels.
The Keyset object permits applications to define which key events they request to receive. There are two means of defining this. Common key events are represented by constants defined in this class which are combined in a bit-wise mask to identify a set of key events. Less common key events are not included in one of the defined constants and form part of an array.
The supported key events indicated through the capability mechanism in section 9.3 SHALL be the same as the maximum set of key events available to the browser as indicated through this object
The default set of key events available to broadcast-related applications shall be none. The default set of key events available to broadcast-independent or service provider related applications which do not call Keyset.setValue() SHALL be all those indicated by the constants in this class which are supported by the OITF excluding those indicated by OTHER.
Used to identify the VK_RED key event.
Used to identify the VK_GREEN key event.
Used to identify the VK_YELLOW key event.
Used to identify the VK_BLUE key event.
Used to identify the VK_UP, VK_DOWN, VK_LEFT, VK_RIGHT, VK_ENTER and VK_BACK key events.
Used to identify the VK_PLAY, VK_PAUSE, VK_STOP, VK_NEXT, VK_PREV, VK_FAST_FWD, VK_REWIND, VK_PLAY_PAUSE key events.
Used to identify the VK_PAGE_UP and VK_PAGE_DOWN key events.
Used to identify the VK_INFO key event.
Used to identify the number events, 0 to 9.
Used to identify all alphabetic events.
Used to indicate key events not included in one of the other constants in this class.
readonly Integer value
The value of the keyset which this DAE application will receive.
readonly Integer otherKeys[ ]
If the OTHER bit in the value property is set then this indicates those key events which are available to the browser which are not included in one of the constants defined in this class, If the OTHER bit in the value property is not set then this property is meaningless.
readonly Integer maximumValue
In combination with maximumOtherKeys, this indicates the maximum set of key events which are available to the browser. When a bit in this maximumValue has value 0, the corresponding key events are never available to the browser.
readonly Integer maximumOtherKeys[ ]
If the OTHER bit in the maximumValue property is set then, in combination with maximumValue, this indicates the maximum set of key events which are available to the browser. For key events which are not included in one of the constants defined in this class, if they are not listed in this array then they are never available to the browser. If the OTHER bit in the value property is not set then this property is meaningless.
Applications that have been designed to handle Mouse Events can express it by using this property.
Applications SHALL set this property to true to indicate that they support a pointer based interaction model, i.e. that they listen to and handle Mouse Events as included in the Web Standards TV profile [OIPF_DAE2_WEB]. They SHALL set it to false otherwise. If not set, an OITF SHALL assume that the application does not support a pointer based interaction model.
Based on the value of this property, an OITF MAY decide to enable or disable the rendering of a free moving cursor.
Note: OITFs are not required to support a pointer based input device even though they are recommended to do so. If pointer based input devices are supported, this is expressed via the +POINTER UI Profile fragment as described in section 9.2.
Integer setValue( Integer value, Integer otherKeys[ ] )
Sets the value of the keyset which this DAE application requests to receive. Where more than one DAE application is running, the events delivered to the browser SHALL be the union of the events requested by all running DAE applications. Under these circumstances, applications may receive events which they have not requested to receive.
The return value indicates which keys will be delivered to this DAE application encoded as bit-wise mask of the constants defined in this class.
The value is a number which is a bit-wise mask of the constants defined in this class. For example;
myKeyset = myApplication.privateData.keyset;
myKeyset.setValue(myKeyset.INFO | myKeyset.NUMERIC);
This parameter is optional. If the value parameter has the OTHER bit set then it is used to indicate the key events that the application wishes to receive which are not represented by constants defined in this class.
String getKeyIcon( Integer code )
Return the URI of the icon representing the physical key or other mechanism that is used by the terminal to generate the key event for the given keycode passed. It SHALL return null if the key has no icon associated with it.
The VK_ constant for the key whose icon should be returned.
String getKeyLabel( Integer code )
Return the textual label representing the physical key or other mechanism that is used by the terminal to generate the key event for the given keycode passed. It SHALL return null if the key has no textual label associated with it.
The VK_ constant for the key whose textual label should be returned.