User Interaction Q&A

The following questions are related to user interaction features provided by a keyboard, mouse, or pointer.

To disable the pointer and mouse functionality in your application, make sure the "config.xml" file contains the following elements:

<tizen:setting pointing-device-support='disable'/>
<tizen:profile name="tv-samsung"/>

For more information, see Mouse.

TV
HTV
#disable pointer
#disable mouse

Even if your application does not support a keyboard, there are some hidden keys that work with a keyboard. The following hidden keys must be mapped to the remote control keys.

Hidden Key

Remote Control Key

Hidden Key

Remote Control Key

Esc

Return

F5

Smart Hub

Number Keys

Channel number

F6

Source

Windows key

Menu

F7

Channel List

Arrow keys

Move focus (cursor)

F8

Volume Mute

Enter

Enter

F9

Volume Down

F1

Color Key A

F10

Volume Up

F2

Color Key B

F11

Channel Down

F3

Color Key C

F12

Channel Up

F4

Color Key D

Number pad input

Channel number

Table 1. Hidden key mapping

TV
HTV
#key
#mapping
#remote control

No, it is not possible to disable the keyboard.

Since some keyboard keys have the same code as the remote controls key, they cannot be disabled. For other keyboard keys, implement a default action to make sure the application does not respond when they are pressed. For more information, see Keyboard/IME.

TV
HTV
#disable keyboard

The Samsung policy requires that the "Exit" key allows the user to exit the application and return to the live broadcast channel immediately from anywhere within the application.

However, there is no Samsung API method that you can use to manually implement this behavior for the "Exit" key. To follow the policy, unregister the "Exit" key and do not handle it in your application. The key's default behavior implements the policy.

In contexts other than the "Exit" key click, you can close the application and all its content by calling the getCurrentApplication().exit() method. For example, a "Return" key click opens a popup with "Yes" and "No" buttons, and selecting the "Yes" button calls the getCurrentApplication().exit() method.

TV
HTV
#exit key
#broadcast channel

To customize the IME to show the number pad only, in the input element, set the type attribute to number. This disables all the letter keys and prediction in the IME.

For more information on the IME, see Keyboard/IME.

TV
HTV
#ime
#keyboard
#number pad

To block a key event, register the key:

tizen.tvinputdevice.registerKey(keys[i]);

The registration blocks the key's default functionality.

TV
HTV
#block
#key

If you register an event for a function key but do not add code to handle the event, the key no longer works. The default function of the key stops working when you register the key event in your application.

TV
HTV
#smart hub
#power
#key

Some Samsung TV remote control keys have separate functionalities for normal and long presses, while others only recognize a normal key press. For information on which keys support long presses, see Remote Control.

TV
HTV
#long press
#key
#remote control

No, it is not possible to make the remote control special keys, such as the color or playback control keys, work in the Web browser. The Web browser does not have access to the Samsung Product supported on Smart TV, Samsung Product supported on hospitality display, and Tizen APIs.

TV
HTV
#remote control
#special key
#color key
#playback control key
#web browser

Yes. To set the maximum length for an input element, define the length in characters using the maxlength attribute.

TV
HTV
#html
#input element
#maximum length

From your application home screen, you can implement the "Return" key to terminate or hide the application. For more information, see Terminating Applications.

TV
HTV
#return key
#hide
#terminate
#policy

The Samsung IME supports the standard keyboard characters, such as upper and lower case letters, numbers, punctuation, and symbols.

TV
HTV
#input method editor
#input characters

Each remote control key has a key name and corresponding numerical code value. Since keyCode values can differ depending on the TV model and platform version, it is recommended to implement key input using the key names whenever possible.

If you implement keyboard input, the keyboard keys also have key codes.

TV
HTV
#remote control
#key codes

The IME does not display correctly in the emulator. This is a known issue.

TV
#input method editor
#emulator

The getCurrentApplication().exit() method of the Application API closes the application and all its content. For example, a "Return" key click opens a popup with "Yes" and "No" buttons, and selecting the "Yes" button calls the getCurrentApplication().exit() method. For more information, see Terminating Applications.

Use the getCurrentApplication().hide() method when you do not want to close the application, but only hide it in the background. For more information, see Multitasking.

TV
HTV
#return key
#hide
#exit
#application api

To avoid issues with keyboard key presses preventing HTML input elements from working properly, do not implement the preventDefault() method within your keydown and keypress event listeners.

TV
HTV
#html
#input element
#keyboard
#preventdefault

The pointer is a feature on the remote control included with 2015 Samsung Smart TV models. The feature allows the user to move the mouse cursor by gesturing with the remote control. To enable pointer support in your application, implement mouse support.

TV
HTV
#pointer
#gesture
#mouse

No. Since keyCode values for keyboard keys can differ depending on the TV model and platform version, event handling for specific letter keys is not supported. For more information on handling keyboard and IME input, see Keyboard/IME.

TV
HTV
#input method editor
#letter keys