I thought about that, but isn't really just a combination of the exit and shutdown macros? You could just put them together to get the end result. Or, is it a different series of codes?
It's not quite the same (you never actually exit the game to the XMB), but is a combination that works in all cases, regardless of the existing state of the PS3.
PS, Down, Down, PS (3s), X, X
The initial PS, Down, Down gets to an exit system option when in a game, otherwise, it just moves down twice on whatever screen you are on. But the exit game option is never chosen. Next, the PS held down does nothing when coming from a game, but gets to the same exit system option otherwise. Then the X, X shuts down in either case.
You could execute two steps, first exiting a game and then shutting down the system, but you'd have to manually know when you were in a game, otherwise the sequence after the initial PS to actually exit the game could trigger other actions (since it involves X) when not currently in a game.
-- David