Rewire Ball-Type Mouse
You need to understand the schematic of the mouse you are using AND the inputs you expect to have to process. 

Here is a typical schematic for X/Y and you are dealing with an A/B quadrature signal:



Source was this datasheet, but it is typical for many of the simple ball mouse implementations. Notice that the X/Y and Z sensing is using the SAME inputs for processing and the LEDs for X/Y and Z are switched which creates quite some complexity.  

If you pick up the LEDs as shown in the video you are likely to have trouble. I'd suggest if you want to just use the sensors you cut the tracks to the LEDs so you can drive them separately ....or if the LEDs are in series isolate the two LEDs and the series resistor and power from 5V.

As already pointed out the signals are analog and need to be processed by a Schmidt trigger input to clean them up.