Exactly what did you use to clean the keys and did you check to see if they're stuck. If you got ANYTHING inside the membrane then there is a pretty good chance you ruined the keyboard. However if you did get some liquid of some type in there you might get very lucky and it will dry out, first immediately remove the batteries and put the keyboad inside a plastic bag with some rice for about 1 week.
If you did not use a liquid then try doing both a iMac SMC and PRAM reset. You will find instructions by clicking the link.