Have you tried cleaning the ziff connector where the keyboard ribbon cable connects? A slight bit of Windex or alcohol on the end of a fine tipped paintbrush can do wonders. I would wipe, then blot with a tissue or paper towel several times.
If you have contact cleaner such as Caig DeOxIt I would recommend that you give the connector a blast of that after you've done the cleaning and are certain the connector has dried.
This is almost certainly not a motherboard issue, in the classic sense of that word, if an external USB keyboard will work.
All it takes is for a contact or two on that ziff connector to have enough crud on it to insulate itself from the connection on the ribbon cable. I would also give the end of the ribbon cable on the replacement keyboard a gentle wipe clean as part of this, too, since you could have "crud transfer."
It's certainly worth a try before going the long way round and replacing the motherboard.
Brian AKA Bri the Tech Guy (website in my user profile) - Windows 10 Home, 64-Bit, Version 1803, Build 17134
. . . the presumption of innocence, while essential in the legal realm, does not mean the elimination of common sense outside it. The willing suspension of disbelief has its limits, or should.
~ Ruth Marcus, November 10, 2017, in Washington Post article, Bannon is right: It’s no coincidence The Post broke the Moore story