Thanks for the reply!
I already have a working sketch for arduino for getting the input, using this arduino library: http://playground.arduino.cc/ComponentLib/Ps2mouse
The way it works is that at the beginning of the sketch, you do:
#include <ps2.h>
PS2 mouse(6, 5);
so that later on you can do:
mouse.write(0xff); // reset
mouse.read(); // ack byte
etc…
So basically I could port this code to Breakout Javascript, as long as I can include the Arduino library ps2.h.
Thanks again!