Yep, Alt Shift and Ctrl do indeed work with the G and M keys (and any other button from any device that works with IS ).

On my G15 for example, the G16 key is follow and Ctrl+G16 is stop following (turn left or right). G18 is my dps spam button, so I've also used Alt+G18 to add in extra DPS from my healer. For my shamans I used to have it so G9 was something like a searing totem or Ctrl+G9 for magma instead.

I like to add modifiers if I need a less common use of essentially the same thing or its opposite.