An HP21 that would not register the 4 and registed the 5 as a 7.
This calculator showed some traces of battery leakage.
The PCB through holes of the 4 and 5 key are just above the battery contacts,
so residues of the battery leakage inside the key domes could be the root cause.

With a needle I dripped some vinegar into the holes of the 4 and 5 keys.
Pressed the keys a few times and suck away the viginer with the same needle.
I repeated this a few times.
I continued this process with some water, to wash away the vinegar and ended with IPA.
Let it dry for a day and the keyboard registers fine now.

An HP22 with a bad 4 key, that could not even be pressed, has been fixed in the same way.