Mollies are never kept in black water, that stuff is almost devoid of all minerals. They are sometimes kept in brackish water or even straight salt water. Mollies do not require brackish as that writeup seems to imply. (Note to self, go fix that entry) On the other hand they do require a significant mineral content in their water. I happen to live in an area where the local tap water is quite hard. For me, mollies not only survive but thrive in nothing but tap water. For people living in locations where the tap water is low in minerals, some form of mineral additives are a must. If you are sure it will not harm your other fish, you could add any number of mineral supplements. That last is a big IF. I am uncertain of the water needs of your keyholes but the other fish would do fine in hard water along with the mollies. There are lots of fish that I do not keep because my hard water would kill them or cause them to suffer. Fish adapt to water that is not ideal for them, to some extent, but we cannot expect a fish that has evolved in hard water rocky bottomed mountain streams to suddenly be placed into a rain forest water quality that is devoid of minerals and to thrive. The poor things are having to fight millions of years of evolution to suddenly find their water devoid of minerals.
The way that fish control their internal mineral content is quite different for a salt water fish which constantly drinks and a low mineral content fish that only ever gets any internal water from it being absorbed through the skin. That poor fresh water fish urinates constantly to remove the excess water that it can't help absorbing.
Think of what happens to you if you leave your hand submerged for as little as 10 minutes. The water absorbed through your skin is visible in the wrinkly look the fingers will get. In ocean water, you simply will not get that wrinkly look very quickly because the salinity of your body is similar to the salinity of salt water.
Next we need to look at fish like common pet shop mollies. They are called euryhaline, which simply means they are quite adaptable within a large range of salinity. A typical pet shop molly can adapt to anything from my hard water to straight, undiluted, salt water. My own water is on the low end of their tolerance though. Much softer than my water is going to condemn a pet shop molly to a slow death of absorbing more water than they are capable of removing.