Layer.onMouseDown

Function/Meaning

Mouse button pressed

Type
LayerclassEvent
Syntax
onMouseDown(x, y, button, shift)
Arguments
x

The x-coordinate value (in the layer's display coordinates) where the mouse button was pressed.

y

The value of the y coordinate (in the layer's display coordinates) where the mouse button was pressed.

button

The pressed mouse button.
It can be one of the following values:

  • mbLeft : The left mouse button was pressed
  • mbMiddle : The middle mouse button was pressed
  • mbRight : Right mouse button pressed
  • mbX1 : Mouse side key 1st button pressed
  • mbX2 : Mouse side key 2nd button pressed
shift

This is the state of the shift key that was pressed at the same time when the mouse button was pressed.
It is a combination of the following values by bit OR.

  • ssAlt : The ALT key was pressed
  • ssShift : The SHIFT key was pressed
  • ssCtrl : CTRL key was pressed
Return value
None (void)
Explanation

Occurs when the mouse button is pressed.

Reference
Layer.onClick