I would like to say ghosting, but you did unplug the keyboard and I'm pretty sure you can't ghost in that situation. Try opening up a new Notepad or text document and see if anything is being written down automatically when the error occurs in game. Also key inputs can get ghosted when tabbing in and out of a program. Some of my games lock the alt and shift keys whenever I tab into them.