Try pressing F* on your keyboard during startup. If it work's select Safe Mode with Networking. If it let's you login, update your antivirus and run a full scan and let it remove any found threats. Now go to www.malwarebytes.org and download Malwarebytes Anti Malware free. Instill it, open it up and let it update it's definitions, Click on Full Scan and let it remove anything it finds. If the keyboard work's in Safe Mode with networking, type Device in the start menu's search box and click on Device Manager up at the top. Is there a exclamation mark next to keyboard ? If yes, right-click on your keyboard in the list and click on Update Driver and click on Update Driver Software ... . If that work's restart your pc. If it doesn't right-click on your keyboard in Device Manager and click on Uninstall. Now click on the Action tab up top in Device Manager and click on Scan for hardware changes. That should reinstall your keyboard driver. Click on Keyboards in Device Manager, the exclamation mark now shouldn't be next to your keyboard. Also open up Computer, right-click on C:, click on Tools, click on Check, put a check on both boxes, click yes or whatever pop's up and restart your pc. I'm using Windows 8.1 now and it's Check Disk doesn't show all the boxes, like 7 and prior do, so I forget what all of them say. That is how your run it though.
It may be easier just to do a clean install of windows. If the pc has more than 1 hard drive, unplug the 2nd one and click Advanced after Install now, format & then delete the partitions. Then do the install. Do a backup of his personal files first.