A lot of people overlook the need to recap anything with a fluid-filled electrolytic capacitor on the circuit board, somehow thinking there are exceptions to the golden rule which says "no electrolytic capacitor has eternal life." I know that to be true myself. Some years back, my SE/30 was freezing for reasons unknown. Eventually, I decided to open the IIgs ADB keyboard I was using, and sure enough, it had an electrolytic capacitor. I swapped it out for a solid tantalum, and I've not had a problem since.
Keep in mind that on some keyboards, there are also ICs which can be shorted out by spilled drinks. You'd be surprised how many keyboards have been killed that way, sometimes slowly over time! So you may need to swap a chip in order to get it working.
Then of course, you would need to check traces with a magnifying glass to see if any have been severed. If someone removed the PCB in the past for cleaning after a spilled drink, they might have bent it too much, resulting in a hairline crack that eventually severed an important trace.
Also, check your cables because that could be the culprit. And never connect ADB devices or remove them while your Mac is powered.