Many people tend to keep their palms on the keyboard surface, directly on top of the mouse. So, inadvertently, they move the cursor or cause seemingly random things to happen, such as menus opening for no apparent reason. Assuming this is your problem, the only solution is to keep your hands, wrists, and arms, above the surface(s) you are typing on; this is the standard "touch typist" method, which, BTW, also reduces carpal tunnel syndrome in your wrists and elbows!