Using software to "Hold Down a button and spam it" would be viewed as automation by blizzard and is banable.
Only legal way for you to do it is to make a /cast macro and hit is as fast as you can.
As for issues with the g15 Its not the keyboard its self that people were banned for but what they were doing with the macro function, 1 button grinding and so on.
Im sure someone else can shead some more light on this But in general using somthing to spam a button for you is illegal.

you also may be interested in checking out the wiki,
macros here http://www.dual-boxing.com/wiki/index.php/Macros
and some Gm conversations that may awnser your questions a little more here http://www.dual-boxing.com/wiki/inde..._Conversations