Find the instructions to replace the keyboard, and take it out then reattach it. It sounds to me like the connector or cable is loose.
If that doesn't work, you can find a replacement on eBay.
Also try a Linux live disc that boots from cd, and see if it works that way. If it does, something is wonky with your OS installation.
Oh, and keep in mind that if the numlock is on, half your keyboard will spit out numbers instead of letters, in case that's the issue.
Also try tapping the shift, altctrl, and other key modifiers hard a few times each to make sure it's not just that one of them is stuck.