If you've got a USB Keyboard lying around, plug it in and see if it works.
If so, you may just have a bad keyboard. They're cheap on eBay (less than $20) and are not difficult to replace. Videos can be found on-line with step by step instructions.
If the USB keyboard doesn't work, check all the USB ports for any broken/out-of-place pieces. If one has any broken plastics or metal tabs touching, it could be the cause all the USB controlled devices to flip out (laptop keyboard included).