IMO quickly switching between layouts is not appropriate for keybinding functionality, as it would be impossible to provide enough keybinds for every possible switch. Also, note that you would be unable to make the switch you describe while in combat, so I'm not sure how useful it would be. Anyway, you'd want to use a macro for your particular switch. The simplest way would be to create two macros, each with the command line sequence to select one of the two layouts. If you wanted to do a bit more work you could check the current Grid settings and select the layout that was not currently selected in a single macro. No, I'm not writing it for you.