I am building a game
And I need to do something when the user clicks on the right mouse button, holds it and then presses the left button>
Use MouseEvent.buttons in your event handler.
MouseEvent.buttons
.addEventListener("mousedown", function(event){ if ((event.buttons & 3) === 3){ //Do something here } }, true);
It is kinda recent though, you may want to implement fallback method, recording state of mouse buttons.