Comments: It is possible in most cases to get a keyboard, to which this has happened, working.
Solution: Immediately turn off the PC and disconnect the keyboard. Then, drain all the liquid from the keyboard by shaking it. If the fluid in the keyboard was not plain water, rinse the keyboard out using plain water, preferably distilled water. Then, rinse out the keyboard using distilled alcohol. This will force the water out of the keyboard and allow it to dry better. Wait until the keyboard is thoroughly dry; this may take two or three days even. The keyboard should then be usable, but don't try to plug it in unless you're sure it is thoroughly dry.
This procedure is not foolproof, and can destroy the keyboard; of course, not doing it will, in many cases, mean the keyboard is destroyed anyway. If the spill was just water, and you don’t want to use alcohol, you may be able to just wait for the water to evaporate. This can take a lot of time.