How to support multiple mice?

I have 2 advanced trackballs and they both have button 3 button 4, etc.

Is there a way I can have separate mice or button bound per device?