Macbook pro Mid-2012 not booting on battery. Not responding to power button Macbook pro Mid-2012 - Keyboard not working (Space and Caps lock only works) - Doesn't switch on using battery, when I remove the battery connector from board and Plug on AC it boots. I had recently changed the HDD to SSD myself.
If it doesn’t boot with the battery connected it could be because...


the  battery is acting as a drain because it’s losing charge faster than the charger can charge it
There is an issue with the battery charging circuitry not switching between the mains and battery power correctly


This one is easy to test; simply get a new battery. If the problem remains, it’s the Mac itself. 

As for the keyboard, you likely need a new one. Simply plug in a USB keyboard and if it works properly, you’ll need a new top case assembly. If it doesn’t, the logic board (USB bus) is dead/dying. 

Given the age of this particular Mac and it’s problems, if you can source good used parts inexpensively, you might get some life out of it, but likely it’s time for a new(er) one.