TLDR: can’t remove rivets; glue the new keyboard in with a medium thickness cyanoacrylateThe spilled coffee on my MacBook Pro (Retina, 15-inch, Mid 2012) disabled only one key on the keyboard. Unfortunately, it was the power button. I confirmed that my MacBook Pro wasn’t completely dead by shorting the pads on the system board that I found on insidemylaptop.com.The top case (which includes the keyboard and trackpad) of the MacBook Pro can be replaced, with new parts on eBay
that cost about $100. I also found that the just the keyboard can be purchased on eBay for about $20.I used iFixit’s MacBook Pro 15″ Retina Display Mid 2012 Upper Case Assembly Replacement guide to disassemble the computer, then found some YouTube videos detailing ripping out the old keyboard.
The problem for me was when I pulled the old keyboard away from the top case, the rivets remained in the case. I later thought that pulling on the keyboard very sharply when I removed it would have pulled the rivets out too.There were screws included with my replacement keyboard but the now the problem was how to remove the rivets from the top case. I found various solutions that included drilling them out, using a screwdriver and hammer to pry them out and removing the rivets by pulling them out with diagonal flush side cutters . The latter seemed like the best solution, except that I didn’t have that tool.It then occurred to me that Apple reparability scores were always very low because they glued everything together. So, I decided to glue the keyboard in using a medium cyanoacrylate glue .Working from one side of the keyboard to the other, I used less than a drop of glue on top of each of the protruding rivets. The glue (use a medium thickness cyanoacrylate) ran down around the rivet and under the keyboard mounting plate, fastening it to the top case. I pressed down on the keyboard for a few seconds to hold it flush with the top case until the glue set.When I put the computer back together, I felt that gluing the keyboard in worked as well as the screws. Typing on the new keyboard felt completely solid and I saved a lot of effort in not having to remove the rivets.