When you remove your keyboard from the virtual core keyboard master device with "xinput float 7" for example, the behaviour you get is like you never released the enter key.
My wild guess is, that the enter key press is the last event, that is routed through the vck and since there is no release event it looks like you pressed that key forever.
The behaviour stops when you press a key on another attached keyboard.
For convenience, the xinput utility could wait for a key release (if that's what caused the problem).
closing this one as fixed with the commit below, though this patch created Bug 36146, please look there for the follow up patch.
Author: Peter Hutterer <email@example.com>
Date: Fri Feb 25 11:08:19 2011 +1000
dix: release all buttons and keys before reattaching a device (#34182)
in server-1.10-branch and will be in 1.10.3 RC2