You can try a very slightly damp paper towel. If it’s soda or something else with sugar it’s water soluble. If there’s any oil in the stuff though, you’ll have to use a tiny bit of soap too and scrub a bit. Make sure you squeeze out as much moisture as possible from the paper towel first, or it will drip into the innards.
Yah I did the same thing. Spilled diet coke on my laptop. Lots of it too! Anyway, I immediately unplugged it (which you should only so you don’t get electrocuted). Then I put it up-side-down (opened) and let the liquid spill out. Then I took my blowdryer and blowdryed the keyboard for a few seconds. (Do not blowdry the screen, just wipe it immediately). And make sure your blow dryer isn’t blowing air too close that is too hot.
Then I left it for a few hours and Voila!! It works perfect! That in itself is crazy since one time I spilled liquid on my phone and it never would work again.
Depending on the type of keyboard, you can sometimes pop the actual keys off, and clean them properly. (On my three-year-old Dell they pop straight up, but you have to use some force.)
Some people actually claim that you can put the entire keyboard in the dishwasher, but I’m not sure that the detergent won’t corrode the switches.