If you just got it, take it back. The keyboard, top Al case, battery, and trackpad are part of the same top case assembly and usually sold as a unit. I believe Apple will replace the whole thing as part of battery replacement, but not sure if they will touch it if a non-Apple repair has been attempted.