I work on this a lot and it occurred to me some people here might like some news on this.

I am referring to mac laptop keyboards, book g3 and later, although this information may apply (slightly modified) to other models of laptop keyboards.

Attempting to repair a keyboard can make matters irreversably worse. You are warned.

Most common complaint I get is someone has popped a cap off, or a cap is hanging loose. First thing you usually need to do is remove the cap and inspect for damage. Under the cap is a "scissor action" - a pair of plastic plates that form an "X" as viewed from the side, and operate a bit like the legs of a folding canvas lawn chair. When the key is pressed down, the "X" flattens.

The scissor action's two plates have several small nubs on them. Two are to lock the two plates together in the middle where they meet. If one of these is broken, the two plates will be separated and won't stay together. You may encounter a key where the plates are not damaged but the one is not locked into the other and you will need to put them together again. Be careful when doing this - the nubs are very small and easily broken off, you will need to spread the one plate ever so slightly apart to fit in the other one without damaging it.

The scissors differ from keyboard to keyboard, and vary moreso when you move to non apple keyboards. In most cases, the scissor anchors to the keyboard in four places. Two are "pockets" and two are "clips". It is very important you figure out this when repairing a key. Inspect the underside of the cap and you will see two pockets on one end and two clips on the other. The pocket looks like a pocket, and the clips are a pair of plastic nubs very close together. The reason this is important to notice is the key cap must be set in place and installed in the correct order. The pocket must be fit in first and the cap slid into place and then pressed down to lock the clip. Attempting to press down the cap to fit the clips before the pocket is in place will break the pockets and thus break the cap. If a cap keeps coming unclipped with little provocation, this is almost always the result of a damaged pocket or clip on the cap.

Next remove the scissor if neded and inspect the key land. There should be a opaque plastic dome in the middle of the land, made of a flexible rubber. Pressing down on the dome should trigger a keypress. If this dome is missing, you can throw away the keyboard - it cannot be repaired.

Some domes have a black plastic ball of sorts inside the dome on the top. Pressing down the dome presses the black bit down onto the land and triggers it (electrically, instead of mechanically) I have seen many cases where that black plastic bit came unglued and was laying on the land, causing a key to either appear held down or to "twitch" several times when pressed. This condition cannot be fixed except by replacing the keyboard. You'll know if this is a problem.

If the scissor looks ok, you can fit it back onto the land. Most scissors meet up with the land on two "L" shaped ears on the land. Fit the scissor down so it catches under the ears. At this point there will be either two or four nubs on the scissor - two on one end and possibly two more on the other. You will see tabs that come up from the land with a little hole in them. That's where those nubs go. Be very careful when getting them back into those holes. The tabs are sharp and will sheer off the nub if you just try to force it down. If the scissor is missing any of its nubs (common for a broken key) you will need to replace it. If you reassemble with a missing nub, the cap will quickly come off again.

Once the scissor is where it belongs, time to put on the cap. Look for the pockets. Lets say they are on the bottom (i.e. toward user) end. Set down the cap about 2mm above where it belongs and press down lightly. Slide the cap down toward you. It should stop when the cap's pockets land in place on the scissor. The cap should now be exactly in line with the rest of the keys. If it is, press down squarely in the middle of the cap and you should get a satisfying *click* or two as the clips lock onto the top of the scissor. Inspect and test the key, it should be in perfect position and line and height with the rest of the keys. You are done.

If the cap does not stop right where it belongs when you are sliding the cap into the pockets, DO NOT press down on the cap. You will almost certainly damage the cap or the scissor.

Some caps are set with the pockets on the top instead of the bottom. (bottom is common for mac) PC keyboards and some mac keyboards have the pockets on the left or right. Adust the above step accordingly for the direction of the pockets.

The larger keys add an additional step They have to have a metal bar in them to keep the key travelling level if pressed off center. When you are about to place the cap, clip the U-shaped bar into the cap. There are two tabs extending upward that look like larger variations on the holes the scissor's nubs fit into. That's where the arms of the bars fit into. Just guide those into their holes and proceed to install the cap as described above, the bar will take care of itself as long as you start its arms in the holes on the land.

The space bar tends to be an exception and varies wildly from keyboard to keyboard. I suggest looking at a similar machine to see how the large bar fits into place normally.

Macbook pro space bars are a terror. I just changed my space bar cap and it was not fun. There are TWO bars under it, once above and one below the scissor. Did I say scissor? I meant THREE scissors. All in all there are 6 pockets and 14 clips to manage. I am not even going to attempt to describe how to get those all where they belong at the same time. STRONGLY suggest studying a properly assembled spacebar before attempting to service one. It also helps to remove adjacent (above and beside) caps to get a better look.

You will also need to know how to remove the caps. For this I recommend a very small flathead screwdriver. Sears sells a set of precision tools and they have a very good small flathead, it's the one with the yellow cap. A screwdriver in the "eyeglasses repair kit"s should work well also.

It's just as important here to recognize where the pockets are on the cap. To release a cap, you must unclip the cap's clips from the scissor's nubs, one at a time. Attempting to "unclip" a nub from a pocket will break one or both. For a cap with the pockets at the bottom, you need to slightly lift up the upper right corner of the cap and sneak the screwdriver up under it. The trick here is that the scissor is narrower where the clips are than at the other end where the pockets are, so you have to get in there quite a ways to get in between the scissor and the cap where the clip is at. Quarter turn twist and it should separate easily with a faint click. Do the other side. Now just slide the cap up and lift it out.

Larger caps with bars under them are taken apart the same way as regular caps. The space bar is an exception, you may find it's easier to take off the space bar if you also free the bar from under the cap before trying to lift up the cap.

If you encounter a keyboard with a damaged scissor (broken nub or hinge nub) you can scavange one from another similar keyboard, or rob one from an unused key on the current keyboard. I've repaired many black powerbooks by scavanging the tilde key. You can also scavange the tilde key cap if they have broken a clip or pocket on a cap.

If you do this sort of thing regularly, keep any old keyboards you encounter, for spare parts. if you are going to take off a lot of keys, be sure you know where each one goes back. 

Don't mess with the caps any moreso than necessary. The clips are made of the same plastic as the cap itself, and are brittle hard plastic. They don't react well to being bent repeatedly, and were really only designed to operate ONCE when assembled, not once a month for a good keyboard cleaning. Play with them too much and you will start breaking clips.

There are several variations from the above on non mac keyboards. One common variation is four clips and no pockets. For these you reinstall the cap by simply centering it and pressing stright down, no sliding involved. To remove the cap requires unclipping all four clips.

Macbook keyboards I am still experamenting with to find a reliable and safe way to remove and change caps on. They are about twice as complex as a regular cap. They appear to be extremely difficult to disassemble safely, but to reassemble them you just set the cap down and press on it. (as ~8 clips lock all at once?) No pockets to mess with anyway. The cap has to be pried up an uncomfortably large distance to get under it to unlock the clips even when using a very small screwdriver, which is risking damage to the scissor. Best way to deal with one of those is to get the clip off somehow and then just press it back on again assuming nothing's broken. Part of the bad news is some (all?) of the scissor is manufactured onto the land and so you are limited in what you can replace if found to be broken.

Some of the above information may be useful when repairing desktop keyboards. I have not gotten a crack at any of the new apple desktop keyboards but they are looking very similar to macbook keys, which is not really good news for me.

I just got done replacing the following on my macbook pro: caps lock, A, S, D, C, left apple, left shift, space bar. I am very hard on keyboards. The A and S were completely unreadable. It's 14 months old. Tomorrow I am buying one of the new clear keyboard skins for it.