She should get herself a lawyer at this point. If trust has broken down to the point that she's resorting to a keylogger to find out what's really happening instead of confronting him with her suspicions, then I have a feeling that marriage is not long for this world.

Lawyer up.