How long has it been since the water spilled? I have left keyboards that got spills on them for a few weeks, in the sun, until they dried, which usually fixes it. If you run the KB while it is wet, it could short things out.
As for the windows/dos working/not working, might be that in DOS, you can press more keys simultaneously than in windows. After you press X keys at the same time in windows, it won't register a new button press. You might not be pressing the keys, but since the water is shorting the switches, at a hardware level it thinks the keys are pressed.