Have your tried the keyboard on another computer?
Have you tried another known working USB keyboard on your computer?
Determine if the problem follows the keyboard or stays with your computer.
If the latter then the keyboard may have been defective and failed.
Lastly, update your post to include keyboard make and model. There may be some known history of failures and problems.