Before WW2 there was a program called Aktion T4, which stood for Tiergartenstrasse 4 in Berlin, the headquarters of the program. At first, starting in 1933 asocials and other "mentally ill" like chronic alcoholics, prostitutes etc., were forcibly sterilised, as well as people with physical defects and everyone who was confined to a mental health facility. In that regard, similar eugenics programs were used by the United States, Sweden and other countries to forcibly sterilise people whom they thought suffered from heriditary defects, or "heriditary" antisocial behaviour.
After 1938, the nazi's started killing institutionalized children, eventually expanding to adults in institutes as well.