The first item to consider, would be to try & locate a replacement
USB Keyboard, preferably an Apple model, a white plastic one...
These sometimes are available rather inexpensively at second
hand stores, on rarer occasion in a local craigslist or online ads.
Since the basic Apple USB (pro or standard) keyboard are my
mainstay even though BT would be supported by almost all of
the Macs present and accounted for, I have USB & backups.
Spares I'm always watchful for, because that's a first-line way
to troubleshoot a computer. A working keyboard. My spare is
as-new in the box it came with. Another new one is with the
original box an iMac G4 arrived in, new yet 10-years old.
Because several keyboard shortcuts are best handled without
question, and the windows model has the Start key instead of
the Command key (for a Mac, the correct ones are necessary)
there is less doubt.
•Keyboard Mappings using a PC keyboard on a Macintosh:
https://support.microsoft.com/en-us/kb/970299
•Boot Camp: About keyboards and key assignment for Microsoft Windows - Apple Support
Had you checked to see if a different USB port would work?
There are times when a connection fails in one port but the
one next to it in the computer can still function. Hardware can
be that way. Or a bad wire, etc, may be the cause of failure.
If a known-good computer is available, you may have already
tried the questionable keyboard (USB) with that to test it.
However, odd as it sounds, the keyboard is 'key' or first-base here.
Beyond that, other hardware may be to blame; the process of any
self-testing or use of utilities, system discs, bootable DVD software
all rely on accessing the computer via keyboard.
•How to use and troubleshoot FireWire target disk mode - Apple Support
With a second Mac computer, with both equipped with FireWire port
you could attempt to use FireWire Target Disk Mode, to test & check
the hard drive, in rarer situations, even more. Keyboard is essential.
Further troubleshooting is indicated, to attempt to tell if the computer
hardware (including hard disk drive, power supply, logic board) are
suspect; or if a software problem (including failing hard drive) could
be part of the greater picture. Try & find another USB keyboard.
Good luck & happy computing! 🙂