I had a similar problem and I traced it back to the HP Quick launch program. Open msconfig and see if HP Quick launch is set to start at start up. If it is, uncheck it and restart the puter and see if the the keys work. Quick Launch caused me so may problems that I finally uninstalled it.
I am helping a friend resolve a problem with this computer. The top row of keys (numbers/@ #$, etc) work fine in MS Word, but not in AOL email or Google, or any other Search engine. She cannot do add email addresses without the @ key. When you type the email address and try the @ key, the last letter of the name appears. My husband downloaded new drivers, the number pad is unlocked, and we cannot figure out why the row of key works in Word, but nothing else. Help if you can!