Your keyboard might type the wrong characters due to malware infections. Remember, keyloggers are common and they can change your keyboard settings. Keyloggers are often undetected, but they can cause various keyboard issues. Check out a good antivirus guide for software recommendations.