I would try another keyboard and/or mouse. One way to test the mouse is to move it to a completely different window before you begin typing. If you notice that the other window becomes the "active" window, then somehow the mouse is clicking "by itself". Otherwise, you may just have a bad keyboard.