Get the latest tech news
MouseEvent: buttons property
The MouseEvent.buttons read-only property indicates which buttons are pressed on the mouse (or other input device) when a mouse event is triggered.
The MouseEvent.buttons property indicates the state of buttons pressed during any kind of mouse event, while the MouseEvent.button property only guarantees the correct value for mouse events caused by pressing or releasing one or multiple buttons. Firefox supports the buttons attribute on Windows, Linux (GTK), and macOS with the following restrictions: On Mac OS X 10.5, the buttons attribute always returns 0 because there is no platform API for implementing this feature.
Or read this on Hacker News