With a "keystroke" recording device. They usually attach between the keyboard cable and the port it plugs into. They are specifically designed to "spy" on whomever has used the computer. It will record not only her passwords but the chat conversation itself. There are a few of these devices around. Some do not record spaces between words so you have to figure that out for yourself. Of course this can be unplugged if she knows it's there,but then you know she's hiding something.