Why is my computer randomly right clicking?
Update Mouse Drivers
If the drivers are outdated or somehow got corrupted, you'll notice all sorts of weird actions, such as your cursor moving on its own, involuntarily clicking, or accidentally opening the right-click menu. In this case, you should start troubleshooting the problem by updating the mouse drivers.