Everyone knows the original Compaq Portable keyboards fail. They have foam “springs” that disintegrates over time. Even if you have an old one and it works the first couple of times you hit the key, it will stop working in short order.
My co-worker had two of these computers and generously gave one to me. In return I fixed his keyboard as well, they both turned out great and I did only had to disassemble the keyboards once, all keys worked after putting in the new foam.
There are a few options for replacement. You can try to find some foam, and salvage the old film + plastic circles.. or you can just buy everything already made. I definitely take my hat off to the people who had no other option but to make their own, but if you value your time I recommend these guys: https://texelec.com/product/foam-capacitive-pads-keytronic/
They have been recommended by many other people as well, and for me, it made the whole process a breeze.
The first step was to open the keyboard and start removing the keys. They were fairly dirty and yellowed.

Here you can see what is left of the foam keys, this green stuff gets everywhere. I put all the springs in a container so I wouldn’t lose them. Also make note of the keyboard springs, they are different. Also, be careful removing the space-bar, it is easy to break the clips holding it on.

Once all of the old ones are out, you can start putting the new ones in. The hard plastic side goes down, and kind of pops in at 4 corners. I found using a dental pick made this easier.

I decided to try retrobrighting the keys. I used some peroxide hair paste stuff, and sunlight. There are many guides online for this.
Once the new foam pads are in, you can start putting back the keys and springs. I took a picture of the keyboard to make it easier, but most keys should be obvious.

Here it is put back together.
