How do I use EditorUserBuildSettings,activeBuildTarget

If I understand correctly, then EditorUserBuildSettings.activeBuildTarget is what you should use to tell what mode the editor is in. However, the Build Settings window allows you to switch platforms only by group, so it confuses me that the type is not BuildTargetGroup.

What values can I expect from this property?

all that are listed on the BuildTarget enum docs page at Unity - Scripting API: BuildTarget

All of them? If I’m just reading from it, that seems very unlikely given that there are four separate targets in that list for Standalone and only one Standalone option in the build settings window.