I know this is an old thread but I had an issue getting my mouse to be recognized by groovyMAME as well even though I had everything to mouse.
What fixed my issue was in the Input config, it had multiple controls set for the X-axis. It was set to Joy X or Mouse X or something else.
I pressed delete to remove everything, and then I reset it to JUST have Mouse X in there. I did the same for the Y direction.
After doing that, the mouse worked fine. This was for light gun games I was having this issue. I was actually trying to get my mouse to work so I could calibrate it with the mouse, then switch everything back to joystick, which my light gun registers as.
Maybe give that a try, if this is still relevant, since this thread is pretty old.