Did you spill something on it? What you're describing sounds like the keyboard is shorting out somewhere, usually I see this sort of thing with keyboards that have had liquid damage.
You can try taking it apart and cleaning it but more likely than not it will need replaced.