Mouse Events in Samsung SmartTV Application Development
A new mouse event has been supported since Samsung SmartTV 2012 models. An application can be configured to support mouse input using a mouse element in the config.xml file, as shown here.
The Smart Interaction’s gesture recognition feature works like the mouse event.
Event handling with remote controller-based anchors and mouse events are used together only in special cases. This is to avoid a browser’s basic tendency of moving the focus to a mouse-clicked element that causes unintentionally losing anchor focus for a random mouse click.
When a mouse clicks an element that either does not need to or should not have the focus, the focus is unintentionally moved to the element, which causes the remote controller to lose navigation capability.
To solve the problem, the anchor-based event-handling method needs to be modified. One way would be processing the onkeydown handler in the <body> tag instead of in an anchor.
This allows the top-most body element to handle the events and solves the focus- losing problem. Many different solutions are suitable for different situations.