Gets a value that indicates which mouse buttons a user pressed.
Note: This property is read-only.
var pressedButtons = event.buttons;
Returns an object of type unsigned shortunsigned short
A bitmask that represents the pressed mouse buttons.
- 0 - No button.
- 1 - The primary button (usually the left mouse button).
- 2 - The auxiliary button (usually the middle/wheel mouse button).
- 4 - The secondary button (usually the right mouse button).
Other values are always expressed as a power of 2, like 8, 16, 32 and so on and represent other buttons.
- DOM Level 3 Events
- Working Draft
Microsoft Developer Network: [Windows Internet Explorer API reference Article]