This property returns the value that tells which button was clicked or released.
Valid values are:
- 1 - Maps to left mouse button
- 2 - Maps to right mouse button
- 3 - Maps to middle mouse button
- 4 - Maps to first X button
- 5 - Maps to second X button
<box on:mouseDown="onMouseDown();"/>
function onMouseDown()
{
var eventObj = shell.currentEvent;
if (eventObj)
{
if (eventObj.button == 1)
{
shell.print("left mouse button is down");
}
else if (eventObj.button == 2)
{
shell.print("right mouse button is down");
}
}
}