dragon worth doing a live update or in device manager go to keyboard and update driver if all else fails try a different keyboard it might be keyboard itself
First step (before messing around with anything else) should be to plug and external keyboard in - this should give a pretty good clue as to whether or not it's a hardware problem.
If external keyboard is OK, then remove the laptop keyboard and reset the connector (might help - although I suspect some kind of matix problem = replace keyboard).
The service manuals are available on the web from HP/Compaq, and they give details instructions on stripping it down (have done to replace power connector before now).
As stevesy said, its most likely just a requirement to reseat the keyboard connector.... unless of course you've spilt liquid into the laptop which could result in either a new keypad or worse, a new mobo.
Thank guys. Yes it works OK with an alternate keyboard and yes, possible spillage and yes possible replacement but where can I get a new keyboard for this laptop?