Someones posted on this before, heres a rough guide - redo the keys as you wish or combine functions into modifier keys

Numpad 1: Warlock 1 Focus
Numpad 2: Warlock 2 Focus
Warlock 3: Warlock 3 Focus
Numpad 4: Warlock 1 PetAttack(); target=focus

etc etc etc

Correct macro syntax would be:

/petattack [target=focus]

Try that see how you.