Yeah, I thought about that, but the fact that it only happens when the lid is open, never when it is closed lead me to believe it is not the lid-open sensor. (I actually originally titled this thread "1400 keyboard lid sensor location?" before deciding that wasn't it.)
I have verified on a second 1400 that when the lid is closed, it ignores keyboard input. This leads me to believe that it is definitely the keyboard or controller. The fact that it happens with two keyboards, and with no keyboard at all, further leads me to believe that it is either the physical connector, or somewhere in the firmware relating to the keyboard.