The code under Launchpad Mame Control in my GitHub repository will turn your TI Launchpad into a USB arcade control interface. Unmodified, you will get two 8 button digital gamepads and a two button mouse. The pinouts are documented in the readme. The mouse device is configured for use with either an arcade trackball or two arcade spinners using the Quadrature Encoder Inputs built into the Tiva C hardware.
How could I go about adding the middle mouse button?