Start by checking whether this is an accessibility setting or a keyboard problem.
- Go to Settings > Accessibility > Keyboard and make sure Filter keys is turned Off.
- Test with the On-Screen Keyboard or a different USB/Bluetooth keyboard.
- If another keyboard works normally, the built-in keyboard is likely the problem.
- Check whether the issue also happens before Windows fully loads, such as at the sign-in screen.
- If it does, that points more strongly to a hardware-related issue than a driver or app problem.
- If the behavior started after a repair or physical incident, internal keyboard hardware may have been affected.
Based on the available guidance, persistent wrong or automatic input is more consistent with a hardware issue than a virus. Testing with another keyboard or the On-Screen Keyboard is the quickest way to confirm that.
References: