How to set the 'axis orientation' option for the current tool?

I am trying to create individual hotkeys that when pressed will set the ‘Axis Orientation’ value, regardless of what tool is active. For example:

  • alt+ w will set it to World
  • alt+ o will set it to Object

And so on, looking at the Mel code that is being spit out and reading the Mel reference, it seems I can set it for a specific tool, such as the move or scale tool. The reference even has the same command for each tool:

  • manipMoveContext
  • manipRotateContext
  • manipScaleContext

I suppose I can get the current tools name and then call the appropriate command name but I wanted to rule out if there is a direct way to do this, is there?

am on Maya 2024