What do you mean it happens even if you unplug it? How do you know your keyboard isn't frizzing out on you? Have you tried using a different board?
Uninstall the keyboard in windows. Start > Control panel > Device manager > Keyboards. Right click the keyboard. Click uninstall. Right click your computer at the top of the list(it is the computer name). Click on "Scan for hardware changes". Let it reinstall the keyboard, and see if that helps.