button property
The MouseEvent.button
read-only property indicates which button was
pressed on the mouse to trigger the event.
This property only guarantees to indicate which buttons are pressed during
events caused by pressing or releasing one or multiple buttons.
As such, it is not reliable for events such as Element.mouseenter_event
,
Element.mouseleave_event
, Element.mouseover_event
,
Element.mouseout_event
, or Element.mousemove_event
.
Users may change the configuration of buttons on their pointing device so that if an event's button property is zero, it may not have been caused by the button that is physically left–most on the pointing device; however, it should behave as if the left button was clicked in the standard button layout.
Note: Do not confuse this property with the MouseEvent.buttons property, which indicates which buttons are pressed for all mouse events types.
Implementation
external int get button;