If a keyboard is disconnected while a key is being held down (either intentionally or accidentally), when the keyboard is reconnected, it may not respond, or it may act as if the key is still held down.
This can happen if the keyboard is unplugged from the USB port while a key is held down, or if a laptop or tablet is undocked while a key is held down on a keyboard connected to the dock through USB.
Windows does not reset the state of the keyboard when the keyboard is reconnected.
Press the key that was held down once. If you do not know which key was held down, you may want to try pressing each key (Ctrl, Shift, Alt, and the Windows key) in turn.