Might simply be a loose keyboard in the ribbon conector. Only way to know is to take it apart, pull the ribbon out and clean the contacts and reinsert it. About a 10 minute job.
If it still doesn't work...then most likely the keyboard has failed and needs to be replaced.
It is possible the keyboard is fine and some hardware on the motherboard failed...but that is very rare.