How to detect right click while mouse is moving?

Is there a way to detect a right click when moving the mouse?

It is easy to detect left click when moving mouse but I can’t detect right click

document.addEventListener('mousemove', e => console.log(e.buttons || e.button))

And also window.oncontextmenu does not fires when mouse is moving