Keyboard got something spilled on it or it got wacked and some traces got broken inside. More than likely it will need a new keyboard, which can be cheap to expensive depending on the model and if you're capable of taking it apart yourself and fixing or have to bring it to a shop to fix it.