I had something similar and cured it by getting a new keyboard. However, my mouse was still working.
Are your mouse and keyboard connected to USB ports or the standard Green and purple ports?
You may want to treat yourself to a new keyboard and a cordless optical mouse. If that doesn't solve the problem, you can always return them.