You can find what you are looking for under the "command" section of Maya's documentation.
Essentially in order to do this you need to edit the state of the manipulators, and you can do so by calling these commands:
manipMoveContext; // for move
manipRotateContext; // for rotate
manipScaleContext; // for scale
You can run these commands with the flags -e (edit) and -cah (currentActiveHandle) and specifiy the axis with 0 (X), 1 (Y), 2 (Z) or 3 (Aligned to View) and end by specifying which manipulator you want to affect.
Like so:
manipMoveContext -e -cah 0 Move;
You could then create a custom shortcut under the Runtime Command section of the Hotkey Editor for each manipulator, but that would mean 3 hotkeys for each manipulator (one for each axis), which would be pretty annoying to use in practice.
I've written a few lines of code that should do what you are actually looking for:
/* This sets the current manipulator to work only in the X axis ------------------------------ */
{
// Query the current manipulator
string $curManip = `currentCtx -q`;
if ($curManip == "moveSuperContext")
{
manipMoveContext -e -cah 0 Move;
}
else if ($curManip == "RotateSuperContext")
{
manipRotateContext -e -cah 0 Rotate;
}
else if ($curManip == "scaleSuperContext")
{
manipScaleContext -e -cah 0 Scale;
}
}
/* This sets the current manipulator to work only in the Y axis ------------------------------ */
{
// Query the current manipulator
string $curManip = `currentCtx -q`;
if ($curManip == "moveSuperContext")
{
manipMoveContext -e -cah 1 Move;
}
else if ($curManip == "RotateSuperContext")
{
manipRotateContext -e -cah 1 Rotate;
}
else if ($curManip == "scaleSuperContext")
{
manipScaleContext -e -cah 1 Scale;
}
}
/* This sets the current manipulator to work only in the Z axis ------------------------------ */
{
// Query the current manipulator
string $curManip = `currentCtx -q`;
if ($curManip == "moveSuperContext")
{
manipMoveContext -e -cah 2 Move;
}
else if ($curManip == "RotateSuperContext")
{
manipRotateContext -e -cah 2 Rotate;
}
else if ($curManip == "scaleSuperContext")
{
manipScaleContext -e -cah 2 Scale;
}
}
Assign each one to a shortcut and they should work as expected, regardless of the manipulator (so you only need 3 shortcuts).
As a final tip (and one which I'm not sure is documented anywhere), to reset the manipulator state just double tap it's assigned shortcut (2x W, 2x E, 2x R).
Hope that was helpful. Have a nice day!