There are two options, talk to him directly or talk to his manager.
If he respects what you have to say you should be fine telling him that you noticed the fungus (on yourself) and that you went to the doctor and the doctor said that it was probably a transmittable one. You then noticed that's what he has. Ask him if he's aware of it, if he's seen a doctor already, ask him if he can suggest any meds (non prescription ones), and if he hasn't been to a doctor then suggest that he should definitely go to a doctor to check it out sooner than later.
If he's the type of guy who is simply not going to want to hear what you have to say, then approach his manager and have him tackling this, just like you'd ask a manager to handle an employee who doesn't care about hygiene. This is a very similar case, main difference is though that talking about hygiene would probably be too awkward to talk about in person so you'd simply let a manager handle it.
Evaluate how he would react to your comment and determine what impact the conversation will have on your work-relationship, and act accordingly.
You should not put up with him using your keyboard, however, meanwhile he has this going on. Don't. Work is not more important than your health. If he refuses to listen then you need to talk to your manager or in this case, his.