These would be a setting in your controls menu which allowed you to run multiple commands with a key bind.
This would save time and be a convenience feature. There would be further customization by having an option to save globally (For all worlds and servers, and will be in a different category) or locally (For that world or server and separated from the other macros. Along with the ability to create your own folders and favorite your macros.
I have attached 2 reference photos which do not include all the features I mentioned above and which are from the mod RedstoneTools.