1: If you have a wireless keyboard, change the batteries. Low battery and low signal can cause random typing problems at faster speeds.
2: If it is a USB keyboard and swapping it didn't help, make sure you've got the latest chipset drivers.
3: Possibly a trojan or other stupid windows problem like a previous poster said. Have you tried a different USB port?
4: If it is a PS/2 keyboard (old) try a USB keyboard - the ps2 header on your motherboard may be going out. It happens.
5: Cleaned your case recently? Get a can of canned air and a shop-vac and blow out the dust with the canned air into the vacuum. sometimes that can be a random cause of problems.
Oh, nd heads up to the guy who had soda spilled on the keyboard:
in the future, and old techie trick is to remove the keyboard and carefully soak it in denatured alcohol. Just go to home depot and buy denatured alcohol in the paint section. make sure it is the kind that is denatured with methanol - others will eat plastic.
Immerse the keyboard in alcohol for about 15 minutes. Then, take it out and let the alcohol evaporate overnight. this will usually dislodge sticky stuff that messes up the keyboard and creates short circuits.