Chosen Solution

My MacBook pro will not boot with the keyboard flex cable plugged into the motherboard. If I plug it in while the machine has booted without, it will immediately shut off and will not turn back on until I remove the flex cable. Any ideas?

Does the MagSafe Light turn from orange to green when you press the power button with the charger and keyboard cable plugged in? If that does happen the MacBook is performing a SMC Reset (Ctrl+Shift+Power button keys held down) due to the keyboard actually being faulty usually from liquid damage. It thinks you are pressing the keys to do an SMC reset on the keyboard constantly and as a result not allowing the MacBook to turn on making it stuck in a reset state. You would have to get the keyboard replaced and that is very hard to do as it requires removing the battery that is held in with strong adhesive + trackpad + keyboard that is held in with a lot of pop rivets which have to be pryed apart. Here’s a video showing how the keyboard is replaced on a A1502 macbook which is pretty much similar to your model: https://www.youtube.com/watch?v=eX2phuS4