Things that go WTF in the night
Finally I figured it was too late to try to unravel it, I'd just shut the whole thing down and try to work on it in the morning. Of course, I had to drag the cursor to the top right corner by moving it to the left, so half my brain was shouting "What the hell are you doing?" and trying to get me to move my hand to the right, while the other half of my brain was shouting back "Shut up! Shut up! This'll work, just trust me", and painfully steering counterintuitively away from where I wanted to go. Meanwhile James was standing behind me roaring "UPSIDE DOWN!! UPSIDE DOWN!! UPSIDE DOWN!!" in excitement over his accomplishment. I was thinking I absolutely MUST NOT yell at him to be quiet, or else he'll get mad and I'll never get him to bed. Finally I manhandled the cursor into the target zone and shut the whole computer down.
Fortunately when I turned it on this morning, it was back to normal, so I'll never know just how James managed to do what he did. The whole thing felt very much like this classic scene from The Gods Must Be Crazy: