Most (if not all) keyloggers are considered malware, so it is a good thing that Avast detects it.