Good Morning, Ihope this helps you.
I did a search about g62 losing keyboard n HP site, and I found a fix for one flaky keyboard was the following:
"To fix the keyboard problem Perform a hard reset on the Notebook by removing the battery,ac adapter from the notebook and hold the power button for 20secs. Also, perform a BIOS update on the notebook by downloading it from HP.com"
Go to HP support and downloads, and follow instruction for updating bios from HP site.