When I had a desktop I used to regularly strip down manky keyboards, wash them, put the keys in a wash bowl to clean them, then put them in a sock on the radiator to dry them before re assembling.
They have worked for years that way.
Usually needs another keyboard when reassembling so I can see what key went where
If you have spilt cofee in yours then it will need more than just drying out as the dry coffee forms a film between the contacts & can cause further problems, as well as corrosion.