Launch the game and adjust macro commands. For example, let numpad0 spawn creeper - we create a new macro and make it type /summon creepersave it with that combination (check video below). All Minecraft cheats check here: https://www.digminecraft.com/spawn_events/index.php
Then we must create a new world with cheats enabled. Join it and check your macros - will it spawn creeper by pressing numpad0?
You don`t need a macro when you want a gift press one key, for example Q (throw item).