After long term use, or a short vigorous cleaning, the keys can fall off a computer keyboards. On full-sized computer keyboards, the keys are sometimes held in place by a + shaped post that fits into a similarly shaped hole on the bottom of the key. These can usually be fixed in just a few seconds. Low-profile and laptop keyboards usually use two hinged retainers to connect the key to the post. These can be a bit more tricky, but are something you should be able to fix yourself.
Keys With a Single Retainer
Examine the key post on the keyboard for its retainer. On a full-sized keyboard, this is a single round or square piece of plastic that fits around the key post like a collar. On a laptop or low-profile keyboard, there should be two retainers hinged together, which requires a different process. If you don't see a retainer at all, look on the underside of the key or on the floor to find it.
Place the retainer over the key post and then center the loose key on the post. Press down on the key, adjusting the pressure over all four corners. With moderate force, this should reconnect the key, snapping the four corners of the key onto the retainer.
Remove a nearby key if your retainer has also fallen off your keyboard, or you are unable to fit the key and the retainer back together. By carefully prying up a key with a flat blade screwdriver, you will be able to see how the key retainer should be attached. Re-attach this second key and then attach the first key using the same method.
Keys With a Hinged Retainer
Lift a key from the keyboard using a small flat screwdriver if the hinged retainers have fallen apart. You need to determine which retainer goes on one side of the key post and which goes on the other, as well as how they are hinged together. If you peer under the raised key, you may be able to see how the retainers fit together. If not, examine their construction as you carefully remove the key and put it back on again.
Connect the two retainers together if they aren't already connected. Slide one retainer into the hooks beside the key post, then press the second retainer into its hooks on the other side of the post. When properly assembled, the two retainers should lay flat around the post.
Lift the retainers with the screwdriver. There are four posts or hooks for the key to snap into. When the retainers are raised, two posts on one retainer are higher than the other two. These are usually the ones closest to you, which connect to the bottom of the loose key. Connect the key to these two hooks, then press the key down onto the keyboard until the key snaps onto the top set of hooks.
If your keys or key retainers won't snap into place, look for broken clips. If the tab or clip on the bottom of a key is broken, you will likely need to buy a new key from the manufacturer, or from a computer repair service. If the key retainer has broken bits, you may need to buy a new key retainer.
In some cases, you can take a rarely used key, such as the CTRL key on one side of your keyboard, to temporarily repair a broken letter key. Simply move the key and key retainer to the letter key position.