Detect active axis on gizmo

Is it possible to return what axis is highlighted on a given transform gizmo?
For example, if i’m in move tool and my mouse is over the X axis of the move gizmo

There’s highlighting and a mouse over tooltip that could be hooked into in theory. I don’t know where that is located in the ui code, but it is possible. May I inquire what is the use case for this? I’m curious as I’ve never been confused by the gizmo, though generally I use hotkeys instead.

I’d love to make a smart contextual rotate script, i’m often rotating objects by increments of 45 degrees. I know i can just rotate on X Y Z using different hotkeys but would love to lump it all under one hotkey

So… you could cycle through modes on a single key, say like…

current_mode = none
modes = (x,y,z)

So just store the modes in a list, tuple, w/e and when the hotkey is pushed it just cycles them. That’s one way, though I do see the draw to using mouse context to do it.