Patch is attached. I'm not using any mouse or keyboard state objects and I'm 100% sure there are no infinite loops. I was just trying to replicate a wavetable-crossfade technique that I use a lot in SuperCollider. There's nothing exotic in it.
What happened was... it was late (should have already gone to bed, but anyway...). On my laptop, the PrtSc key is right next to the Ctrl key. I was reaching for Ctrl to move a slider while still in edit mode, but I pressed and held PrtSc instead, and got a lot of screenshot pop-ups. At some point, Esc stopped functioning to dismiss them. So I clicked Cancel on all of them. When I could finally see Pd again, there was a weird error box sticking out from behind a window, whose message was something about "grab failed" (I don't remember the exact wording).
At this point, the OS and all other apps had stopped responding to the keyboard. I thought, OK, Pd is doing something wrong, so I used the mouse to File -> Quit. This seemed to be OK (Pd had definitely not crashed or hung). But the keyboard was still inoperative everywhere else. Mouse clicks were mostly OK, except that clicking on a menu in another app did nothing. Somehow I was able to get to "Restart" in the system menu and do a proper reboot, but at that point, that's the only thing that was working.
Never seen anything like that.