This topic describes how your application can receive input from a mouse.
Mouse Events
The user can interact with your application using a connected mouse.
Figure 1. Mouse
Note Interaction with the application using a mouse is enabled by default. If you want to disable it in your application, add the following line to the "config.xml" file:<tizen:setting pointing-device-support='disable' /> If a mouse pointer is shown on your application and your application does not act according to mouse clicks, a serious defect will be reported when your application is verified by Samsung.
Interaction with the application using a mouse is enabled by default. If you want to disable it in your application, add the following line to the "config.xml" file:
<tizen:setting pointing-device-support='disable' />
If a mouse pointer is shown on your application and your application does not act according to mouse clicks, a serious defect will be reported when your application is verified by Samsung.
The supported mouse events are described in the W3C Mouse Events.
To receive notifications for mouse events, for example, the click event:
click
Create a listener for the click event. The listener is notified each time the element is clicked.
<div id='button' ... onclick='handleKeyClick();'> ... </div>
or
document.getElementById('button').addEventListener('click', handleKeyClick);
Define the listener:
function handleKeyClick () { // Something you want to do ... }