How to make custom shader outputs active?

In Cycles/EEVEE, selecting a shader output node makes the node “active”. This doesn’t happen with custom node graphs though, and I have a custom output node that I’d like to act in a similar way. Is there something in the code that I need to do to let it toggle between active outputs on select, or do I have to come up with a button operator workaround instead?

Just wanted to bump this once to see if anyone could help me out here. If there isn’t an easy way to do this I’ll just go ahead and implement a button to do it.