Skip to main content

MouseButton

Enum representing mouse buttons.

Used to identify which mouse button was pressed during a mouse event. The values correspond to the MouseEvent.button property.

Enumeration Members

Back

Back: 3

The browser back button (if available). Corresponds to MouseEvent.button value 3.

Defined in

types/MouseButton.ts:30


Forward

Forward: 4

The browser forward button (if available). Corresponds to MouseEvent.button value 4.

Defined in

types/MouseButton.ts:36


Left

Left: 0

The left mouse button (usually the primary button). Corresponds to MouseEvent.button value 0.

Defined in

types/MouseButton.ts:12


Middle

Middle: 1

The middle mouse button (usually the scroll wheel button). Corresponds to MouseEvent.button value 1.

Defined in

types/MouseButton.ts:18


Right: 2

The right mouse button (usually the secondary button). Corresponds to MouseEvent.button value 2.

Defined in

types/MouseButton.ts:24