Get Particle Hair Key selected status in Python API

Hi everyone,

This is the first time I post something here. Some days ago I started researching if there is a way to create groups from particle hair keys but very soon run into a problem. There is no way using Python API to know what hair keys are selected. I just wanted to know if the first hair key from the particle is selected and then make a list out of them. Additionally, it would be very nice to have some sort of unique ID for a particle so I can use it to store the groups because. I think this is very helpful when creating hair.

I guess the only way is to make a build of Blender implementing a new hook for the Python API. I started looking in the source code and found where the hair keys properties and functions are defined but I’m not familiar with Blender’s architecture and source and couldn’t find how this properties are accessed.

Can you help me start in the right direction?