To create a macro, right click on the button cell to which you want to assign the macro and then select New Macro from the drop-down menu. You'll see the cursor flashing in the cell, just like for a basic command.
Now input your keystroke sequence, exactly as you would input it in the game using the keyboard. You will notice that the keys are shaded to indicate that they are part of a macro and not just a basic keystroke sequence. Click the green tick mark when you have finished inputting your chosen macro sequence. Just as with keystrokes, the editor will prompt you to name your command. When you have named the macro, hit the return key on the keyboard.