Have you added/changed any hardware or drivers on the computer?
PS/2 or USB mouse and keyboard? Try (borrow) the type that you don't use - same problem?
1) Remove and re-install drivers for the mouse and keyboard.
2) Try a System Restore to a date when the Keyboard worked.