I haven’t had a chance to read the thread fully, but I made the following change to the keypress section:
/cast [noform] Moonkin Form
/cast [noform:4] Moonkin Form
This is so that if you are in another form (i.e. travel form) it will correctly place you in moonkin form before you attack.
There was also a typo in the KeyRelease section:
which I assume should be: