I think I see the check, though I'm not entirely certain. It looks like it's using the mouse button line by setting it as an output and asserting it for ~1ms, then switching back to input, checking to see if the mouse button is still asserted after ~7us, and then checks to make sure it's not...