You might be right about it being a hardware issue. But it just happened after I installed Windows 8.
This does not sound like a hardware issue so much as a hardware DRIVER issue. I’d bet that Windows 8 is using some default keyboard driver that just doesn’t correspond closely enough to the keyboard driver that you should be using. This is very likely if you are using a wireless keyboard that came with an installation CD or self-installing USB key.
The drivers that came with the keyboard were not compatible with Windows 8, therefore Windows tried to use a default driver so that you could still use the keyboard for input, but it was not a good match. So, plug in a regular USB or old-school PS/2 keyboard and use that to log in to Windows, then go to the website for your wireless keyboard manufacturer and download the updated Windows 8 drivers.