Is it possible to give enrol key for topics in a course ?
if it is possible to give an enrollment key for a topic I am not aware of it. However, you can give enrollment keys for groups so that when students are entering the course they are automatically allocated to a particular group. You can associate groups with "groupings" and then specify that certain activities or resources are only viewable by certain groupings. That may have a similar effect to what you are looking for.