You have a keyboard that can type all by it`s self, where can I get one, does it read your mind then do the typing for you! Just kidding to lighten the mood.
Try putting it in another usb port if you can, see if it works then. If not check that the Usb root hub for the ports is working and there are no problems.
Most likely the keyboard has gone, so if you can test it on another system it will confirm its the keyboard at fault.