Does the keyboard work in the BIOS? If it's just not working in Windows this could be a software issue but if it's not even working outside of Windows then it sounds like there is something physically wrong. Did the person selling it indicate why they were getting rid of it? Was it supposedly working perfectly for them?
My personal feeling is if it's flaky and you can still return it, you should. If you cannot return it then you may want to go back and inspect the keyboard ribbon and the area surrounding the connector on the motherboard. Look for any damage, pinch marks in the cable, etc. It's possible it's just a bad keyboard in which case you might be able to find a replacement on ebay, but unless you know that's the issue (due to a damaged cable, liquid spill, etc) it could be a waste of money.
Of course you can always use an external USB keyboard. That's not a great solution if you want portability but it should allow you to use the machine for the time being.
Some keyboards use a non-standard USB device profile which can prevent them from working in a BIOS. So it could just be the particular USB keyboard you have.
Anyway, I hope the replacement works out for you.
Not sure then. I'd guess your best bet is indeed trying to replace the keyboard. Hopefully that's the extent of the issue. Sorry I don't have any better ideas.
EDIT: Had a thought. Since it worked initially then stopped it could be something Windows did. You might try REapplying the ATK and any hotfixes(if available). Not sure if you've tried that since you already applied them once.