Back in the 1980s I managed to spill tea into the open top of my printer -- an old Centronics dot matrix printer with some fairly hefty motors. At the time I took my tea with milk and sugar. A friend helped me find replacement fuses, and advised me to carefully wash the electronics in water, not alcohol -- alcohol doesn't dissolve sugar.
It really doesn't.
The tip was a good one, the printer worked for several more years afterwards.
Fast forward into the 1990s when I spilled a sugary drink into my keyboard at work. I went to IT for a replacement keyboard and talked to them about washing the old one; they said they always washed them with alcohol. I pointed out that didn't dissolve sugar, but took the replacement with me. At the time computer hardware was a bit more spendy than now, so there weren't a lot of spares hanging about; I didn't like the new one, so I took the old one apart, washed it with water, rinsed with alcohol (dries faster) and used compressed air to dry it. When I brought the replacement back they asked why, I said that I'd fixed my old one and didn't need the replacement. The response? "How did you do that? We can never get them to work again!" "That's because you wash them in alcohol!"
I don't have a 100% success rate (last keyboard I dumped a sugary drink into works 99% -- for some reason I can't get the numpad + to work) but, generally speaking, washing with water > washing with alcohol. Once the contaminants are washed off, however, alcohol makes a good rinse. Best combined with disassembly so there are no trapped pockets of liquid. Take a photo of your keyboard before pulling off the keycaps, if you do that, so you know where they all go back. :)