Keys no longer responding on Magic Keyboard (A1314)
I think what you have is a worn out keyboard. I've had a keyboard do this to me. More than one actually. I'm a writer by the way. And since 2011 if you used it daily, that's a lot of keystrokes.
Not only wearing out, but the key pads - the contacts inside - can develop corrosion. Kind of like rust? but actually just grime can slowly coat the surfaces inside and stop the contact being made when you press the key. Try borrowing another keyboard. I don't think they can be repaired.