A keylogger is indeed a Trojan, but that is the point.