unoriginal1 :
Usb or Ps2 connection? If usb try plugging it into the front usb hub, or vice versa into the back if it's in the front.
Is it wireless or hard wire?
Try the keyboard on another machine. If your getting the same issues it could just be time for a new keyboard.
I have tried changing keyboard, changing USB port, checking USB port if it works, but when i start up with Linux it works, even in boot and bios mode. There is something wrong with windoews 7. Sommetimes after my problem i get i blue screen