That really depends on how soluble that dirt is, and whether it is ionic. Given that if the muck in the keyboard was water soluble and ionic, it would almost certainly already not be working if there was any significant amount in there, and even if there was, the electrical conductivity of the (probably sealed with varnish) copper tracks in the keyboard would be much higher than that of the water, and the control voltages in keyboards are typically low, so the only thing to worry about might be the small possibility of a short-circuit in an individual switch. In a decent keyboard, with mechanical switches, the gap between the switch being open and closed is quite big, so I think this concern is a bit overblown.