On top of everything that the others have told you, I would suggest making regular backups of your information. Keep daily backups for at least 3 days, weekly backups for at least 3 weeks, and monthly backups for at least 3 months.

This way, if your ex ever gets a hold of your laptop again, you can use those backups to restore to a point before he borrowed it.

You may also want to contact your local law enforcement agency and see what options you have. I would do this before you remove the keylogger and reformat the computer (just in case they need the evidence).

And most importantly, since he is your "ex" and you know that he may have done this this time (coincidence aside), don't ever let him use your stuff again. (Sorry for stating the obvious)

Have a great day
Patrick.