A String system variable that contains the value of the last mouse button pressed.
The mouseButton variable is either LEFT, RIGHT, or CENTER, depending on which button was pressed last.
Note: Different browsers may track mouseButton differently. See MDN for more information.
Examples
This page is generated from the comments in src/events/mouse.js . Please feel free to edit it and submit a pull request!
Related References
doubleClicked
A function that's called once when a mouse button is clicked twice quickly.
exitPointerLock
Exits a pointer lock started with requestPointerLock.
mouseButton
A String system variable that contains the value of the last mouse button pressed.
mouseClicked
A function that's called once after a mouse button is pressed and released.