Long story short, the rice will draw the water out of the device. The long story is the dry rice will absorb the water vapor, and additional water will evaporate to maintain equilibrium, and that vapor will be absorbed by the rice, etc., etc., etc. until the liquid is fully evaporated. It's why people put a little rice in salt shakers, to keep the salt from absorbing moisture, getting damp, and sticking to itself.
I think your space key maybe unfixable. I've never done it myself, but researching a keyboard replacement may be worthwhile.