If a key is physically stuck in the down position, you might not have to replace the entire keyboard. Many keyboards have keys that can be removed by inserting a butter knife under one edge of the key and gently prying up on the top and bottom edge. After the key has been removed, using a swab with alcohol, clean the underside of the key and the key's slot in the keyboard. Replace the key by snapping it back into place.
If the notebook is still under warranty and a key is stuck, you should contact HP to see if the notebook can be serviced before removing a key.
To avoid damaging the pad under the key, insert the butter knife only 1/8 inch under the edge of the key.
Figure : Butter knife gently prying up on key, cotton swab cleaning key
Other tips to think about when encountering a stuck key:
Turn off the notebook and unplug the AC adapter before working on the keyboard.
If your notebook has a removable battery, remove the battery before removing the key.
If the key is stuck due to liquid or other substance getting into the keyboard, cleaning might be the only option.
Longer keys, such as spacebar and Enter, probably have a small metal rod for support. This rod must be inserted into the key and keyboard before replacing the key into the keyboard.
Figure : Metal Rod connection point for the space bar
If a key cannot be unstuck, or the keyboard does not have keys that can be removed, service the computer.