Phaser API Documentation

<readonly> button: number


A read-only property that indicates which button was pressed, or released, on the pointer during the most recent event. It is only set during up and down events.

On Touch devices the value is always 0.

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.

Default: 0
Since: 3.18.0
Source: src/input/Pointer.js (Line 107)