Sounds like USB controller is damaged. Install a PS/2 keyboard and mouse. If no PS/2 ports, install a USB adapter in a slot.
When you’re troubleshooting your computer or installing a new operating system, you may need to “boot from a disc” or USB device (like an external hard drive or flash drive). Here’s what that ...