Chosen Solution

I met exactly the same problem mentioned in Keys F1,1,Q,A,Z,Backspace,F12 don’t work and Keys F1,1,Q,A,Z,Backspace,F12 don’t work - Apple Community. It seems that the problem is caused by a broken cable. However, I have no idea which cable should I replace since the model used in the above blog is different from mine. I am using a MacBook pro in the early 2015 (A1502) model.

I would connect an external USB keyboard to double check things. Often the keyboard it’s self is damaged and as the cable connection is part of it you have little choice than to replace it. But sometimes the issue is within the Trackpad cable as it tends to get damaged MacBook Pro 13" Trackpad Flex Cable. Sadly they are hard to come by new as it was a common issue when the battery should press on it. Now you are likely wondering why the trackpad cable would be involved here the issue is the routing of the signal does not go directly to the logic board from the keyboard instead it goes to the trackpad and then back to the logic board as the UART chip is within it. Here’s the guide MacBook Pro 13" Retina Display Early 2015 Trackpad Replacement