Mouse
This topic describes how your application can receive input from a mouse.
Related Info
The user can interact with your application using a connected mouse.
NoteIf you want to enable / disable it in your application, add the following line to the "config.xml" file:
<tizen:setting pointing-device-support='enable' />
<tizen:setting pointing-device-support='disable' />
If "pointing-device-support" is not included, default value is applied.
Feature | 2015 ~ 2020 | 2021 ~ | |
---|---|---|---|
Default Value | enable | disable |
2021 / 2022 feature will be changed to disable in July 2023.
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:
-
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 ... }