See if you can figure out how to remove the keyboard and (carefully !) check that the keyboard connector is attached to the motherboard.
If there's damage to the flat cable, probably the whole keyboard needs replacing.
If the model is fairly new -- even if out of warranty -- see the vendor about fixing it (hopefully for free) though they may argue that you've been pounding on the keyboard.
If it's a few years old, spares from popular models turn up on e-bay. Sometimes cheapest to find a whole computer that's been scrapped with (say) a broken screen in a flea market .