Glue the laptop keys back on your keyboard. This method is only for the nimble fingered. Once the key has broken, inspect it. Many keys have plastic latches on them, or attach by “snapping” onto something. If this is the case, and the latch for the key simply broke into a couple of pieces, you can try Crazy Glue. Glue the pieces together and let them set for a few minutes. Then try snapping the key back into place on your keyboard.
Send the computer back to the manufacturer. If your laptop is under warranty, then you should definitely take advantage of the warranty program. If your laptop is no longer under warranty, this method of repair can be quite costly, as many manufacturers have tiered repair prices. Usually the first tier is several hundred dollars. Also, manufacturers are notoriously slow with getting your laptop back to you. It can take a month or more.