The commands you're wanting to use in the LGS software need to be programmed in XIM.
So from your example, I could program a macro for the right mouse button to jump, crouch, move forward, jump and crouch.
In XIM, the commands would look exactly as you have them.
In LGS, you would assign a macro to the right mouse button (press space, release space, press ctrl, release ctrl, press w, release w, press space, release space, press ctrl, release ctrl)
Right mouse button should not be mapped to anything in XIM (primary or secondary). Now when you press right mouse button, the macro from LGS should kick in with the command sequence you programmed, and XIM will take those commands and perform them in the game.
Hopefully this helps.
-TheWalt
ps. to program your own controls, one way is to plug a keyboard into your XIM, and map all the buttons to separate keys on the Secondary tab. Then you can use these mappings for all your macros, and use your Primary tab for direct input mappings into XIM. Or you can save a physical step and just use RMLs configuration, and program your macros using his keymapping. What you don't want to do is program multiple commands to the same button, or any key you're expecting to use as direct input.