Things I see here.
1) The second Keyboard you plugged wasn't any good either.
2) The PS/2 port for your keyboard on your motherboard, isn't any good anymore.
Computer off, plug it into the Mouse PS/2 port, and use a USB mouse.
BIOS will reset the I/O address for that PS/2 port, and set it for the Keyboard, when the computer is turned back on.
You may have to;
A) Turn the computer off
B) Unplug from power.
C) Press the Power On button in, and hold it in for a count of 10 seconds. Let go of the Power On button. Do this same procedure two more times.
What you are doing is draining residual power, clearing CMOS Error Codes, and resetting BIOS back to the factory default settings.
Keyboard plugged in, USB mouse plugged in, plug the computer back into power. WAIT 1 minute, turn the computer on.
You didn't unplug the old Keyboard, WITH the computer on, and plug the new Keyboard in, did you? It isn't a hot-swap device. The computer must be off when unplugging a mouse, or keyboard.
For additional questions please post in a Comment.