What to do if you spill liquid by accident on your computer keyboard
If you spilled your coffee, a glass of water or any other liquid on your computer keyboard, unplug it immediately or immediately turn off the laptop.
Turn the keyboard upside down and shake it up to get as much liquid as possible.
Sponge with paper towels keeping the keyboard upside down.
Let it dry upside down at least overnight by putting it on a "rice bed". The rice will absorb moisture and speed up the drying of your keyboard.
Reconnect your keyboard (or turn on your computer) only when you are sure it has dried.
This trick also works for a cell phone that has fallen into the water.