I've found for my mouse... Logitech G5...

I went in and set the thumb buttons to a keystroke.
Something like Alt+Ctrl+Underscore and Alt+Ctrl+Backspace.

Within warcraft, it would occasionally stop understanding the button press.
Warcraft always recognizes the key combination.
It's quite unlikely I'll accidently send either of those key combinations.

Could try that..