If you are experienced at laptop repairs, you can often replace a keyboard for $25 for a new one and a half-hours work. I have done this on older HP laptops.
But, if you're NOT, there is a serious risk of breaking fragile connectors and cables doing this -- so I do not recommend it.
Instead, I would recommend you hunting down a local laptop repair place to have THEM replace the keyboard. Sometimes, on some models, you have to replace the entire top surface of the laptop, not just the keyboard. So you should get an estimate of what is involved before you have the work done.
***If my post helped, click the White thumbs-up symbol to say thanks***
***Please mark Accept As Solution if my post solved your problem***
I am a volunteer and I do not work for, nor represent, HP
Be alert for scammers posting fake support phone numbers and/or email addresses on the community. If you think you have received a fake HP Support message, please report it to us by clicking on "Flag Post".