This is still the top answer here for replacement keyboard, so I figured I'd offer my recent experience in repairing my keyboard after spilling soda on it.
There are three options to fix a key that is stuck due to a spill. I list them in order of ease.
Keep in mind that all of this is likely to void any warranty. Some of it may damage your computer more than it already is.
- Remove the top of the key and clean under it.
Using a toothpick or other small prying device like a guitar pick, a plastic spudge, you can pry from the sides and pop the key cap off. There is a metal clip holding the key top down to a surface with a rubber membrane that actuates the key switch. If done carefully, you can remove enough of this to clean the mechanical workings of the single key. This may not be practical if you have many problem keys.
- Replace the keyboard.
The keyboard is not simple to get to. Officially, as mentioned in other answers, you must replace the whole assembly which includes the keyboard, backlight, trackpad, and batteries.
If you are willing to spend nearly a full day doing the work yourself, or happen to be a computer repair person and can do it faster, this is a reasonable option.
You will need the right screwdrivers and an anti-static work surface. Pentalobe, hex, and a tiny philips are all needed. See other guides for sizing, but most computer repair kits these days come with the needed sizes. You will also benefit from a fine pointed plastic pick, and a strong plastic spudger for flipping open cable connectors and moving tiny wires into place.
Follow the teardown guides you can find on the net.
When you get to the keyboard, you will see it's secured with what look like rivets. It's necessary to rip the keyboard out of those 100+ holes, trying to get all the rivets out of the case in the process. From what I've seen, this works fairly well, but you may have to pull some that got left behind with tiny pliers or drill them out.
The new keyboard can be purchased online in various places for not too much money. You will also need the pack of 100+ tiny screws, ph000 I think.
The keyboard can now be screwed in place using the holes left by the rivets. The screws should self thread into the aluminum.
Put everything back together and see how it works.
- Give the keyboard a bath.
This is the option I chose because I didn't like the idea of ripping the keyboard out and didn't know how much of a complete pain it would be to remove the batteries. None the less, it seems to have worked out since I'm using that laptop right now to compose this.
It's necessary to completely disassemble the laptop as before, but also remove the battery and trackpad.
Removing the battery is ridiculously difficult, and in most places on the net it's written off as simply impractical to attempt. Even Apple techs are instructed to replace the whole assembly when replacing a battery.
You risk puncturing the battery cells in this process. That's double plus not good. These batteries can quickly turn into a smoking jet of flame if damaged in the right way.
But if you are willing to try anyway, here's how.
Get a strong pry tool that can slide under the battery packs and cut through the thick double sided tape in the process, without bending up and into the battery cells. I used relatively thick plastic pry tools made for door panel removal on cars. But I think a thin metal pry tool as sold for working on computers would have worked better. Work one pack at a time until you have them all loose.
The two center batteries on the 15" are taped to a strong piece of spring steel that is then taped to the case to cover the trackpad. I'm not sure which is easier to remove, but it seems that the steel plate will go with the case or the two cells depending on which tape seal you break. The steel curves over the side edges and won't be possible to get under from the sides, but can be gotten to from the center of the laptop side if you can get past the cables that are in the way.
I used some 70% isopropyl alcohol in a syringe to try to make removing the tape easier. Others suggest applying heat to the case for the same reason. I found the alcohol did remove the stickyness of the tape at the edges, but the tape is about half an inch wide and the alcohol did not do well at penetrating. Also, I'm not sure if the plastic covering the batteries was keeping the alcohol out of the batteries since they formed pucker lines under the tape in prying.
Be careful to not deform the batteries when working them out. They are like a very hard clay inside a plastic cover. And definitely don't puncture the plastic!
I can't really say for sure if heat or solvent is very helpful. But I can say that removing the batteries was just about the most frustrating thing I've ever done in computer repair.
Assuming you manage to get the batteries off the case, the trackpad under the steel plate is fairly easy to replace. There is a screw over a switch on the underside of the trackpad. It's designed to be an adjustment for the clicking action on the trackpad. If you screw it back in too tight, your trackpad won't click. Too loose and the pad will rattle
Once everything else other than the keyboard is removed you can clean the whole keyboard.
Depending on what you spilled in it, choose your cleaner. If it's something fatty like coffee with cream, you may need to use alcohol or similar solvent. If it's just sugars, distilled water will do. Ideally, find Deionized water as it's even cleaner than distilled. I couldn't find deionized locally so I used cheap distilled and it's working fine.
Using a clean plastic tub to avoid any new contaminants getting dissolved, simply submerge the body and keyboard in your solvent and swish it around. Brush the keyboard with a toothbrush while submerged. Be careful to not leave behind any bristles if you brush the underside. Actuate all the keys over and over to work loose any dirt or stuck on residue.
When you think it's fairly clean, repeat the process with a fresh batch of cleaner.
Then repeat with distilled or deionized water, and once more with a clean batch.
Dry it very well
After it was clean, I shook out the water, dried it with a microfiber towel, and then with a hair dryer set to low heat. Then I let it sit overnight in front of a dehumidifier with the dry air blowing over it all night. Since distilled and deionized water contain very little mineral content of any sort, it should dry with no water spots at all, and nothing left inside the components.
Reassembly is easy except for knowing which screws go where if you didn't organize them well. I recommend taking a photo of the layout as you go along, and possibly printing out the photo and placing the screws on it as you take them out. It's not that hard to figure out which length to use where, but if you get it wrong you might go too deep and strip out the socket trying to get to tight.
Also be mindful of which parts go on in which order. Best to take notes on disassembly since there are times when things have to go under other things, or partially under them. I found myself having to take up the main logic board several times to fit things back right.
Batteries may rattle
The biggest issue I had with the reassembly was the batteries again. With the tape all malformed and not sticky anymore, it's pretty useless at holding the batteries firm. They rattle in the case now.
I plan to resolve this by using some foam tape to reduce the gap. But I won't be using double sided adhesive.
Prior Mac laptops had removable battery packs and didn't have a need for heat sink. But I suspect these batteries may be using that tape as a heat sink connecting to the case with a lot of surface area. The palm rests have always gotten warm with use. So I'm thinking of options to restore that heat transfer capability without resorting to similar tape. It's probably not really an issue. But I'd like to at least stop the rattling of the batteries in the cavity.
I found thermal padding that can be cut into shapes to stick to the batteries and thereby remove the gap while giving them a thermal bridge to the case as the tape was likely doing. These pads are tacky, but it's not so much an adhesive and they stay in place, but can peel off easily if needed.
I found it necessary to put them on front and back of the batteries unlike how Apple had the tape only on the hidden side. Since the pads aren't super sticky, this keeps the batteries from falling the sub-mm distance to the case bottom when it's sitting normally.
I hope this guide is useful for at least knowing how much of a pain the process can be.
I personally find Apple's use of rivets and adhesive on a "Pro" product that would normally have a useful life of up to 10 years (multiple owners likely) to be a huge detraction from the quality of the product, and a big ding on my feeling of Apple's brand superiority in hardware.