Refresh/Reinstall the Drivers
In order to make things that plug into your computer work properly, we have things called "Drivers", which do their best at "driving" the hardware (such as a keyboard or mouse) in the right direction so signals are received and interpreted correctly. Sometimes, if a weird program gets installed or something gets knocked loose in the firmware of your computer, these drivers can go back and require re-installing. To do this with keyboard drivers, you'll have to navigate your way to the Device Manager which can be found under this directory:
My Computer (Right Click On It) > Properties > Hardware Tab > Device Manager
Once you get here, you should be able to locate the "keyboards" section pretty quickly, expand it using the plus button to the left of it, and right-click on the keyboard driver that appears underneath. Choose "Uninstall", follow the instructions, and then restart your computer. Generally speaking, Windows will automatically re-install basic drivers like for keyboards, mice, and video cards, etc, so once it gets back to the desktop, try it out and see if you have any luck!