Intermittent failure of certain keys to respond Came across the second MacBook Pro keyboard recently that exhibit very strange symptoms.
Certain keys seem to stop responding despite being clean and traveling very easily just the rest of the keys. Both of them went to the Genius bar for testing, one of them for the 'long run', and came back as "works normally". Of course, despite still intermittently showing symptoms.

The affected keys in both cases were confined to the top row of letter characters on a qwerty-layout like tyuiop. Not always the same keys, not alway all keys. Sometimes all of them really do work normally.

Searching around there are some similar problems reported, apparently mostly on Apple hardware. 

First port of call should be this Keyboard key stuck or not being recognized; how to fix but that reads like a permanent physical/electrical problem. And the supposed fix is really just an inconvenient workaround that further would be quite impractical to implement on that many keys.

Searching some more similar symptoms are reported here
Keyboard Intermittently Non Responsive - Top row of Qwerty only (This issue was not really solved…)

qwerty row on macbook air won't work from time to time Also no solution but a lot of voodoo reasoning or observations.

shift key + qwerty row of keys not working To look at similar but non-fruity situation.

Keys qwer uiop Not Working, Rest Other keys Are Working Fine – Laptop, Desktop Linking the key failures to dirt.

Strange symptoms with strange solutions that indicate a keyboard for itself may be fine: Unresponsive Keyboard and Trackpad problem

Both keyboards I examined had no spill related damage, both were cleaned underneath the key caps (minimal dirt there before), one I disassembled completely to really clean it. There is no swollen battery, no strange matter inside the machines.

Two further peculiarities to observe:
Pressing multiple (unresponsive) keys at once seems to yield a temporary relieve and the problems seem to be get more severe when the machine heats up and less severe when running cooler.

What could be the cause of this? How to fix it?
If you have this problem, prepare yourself for a long session of searches and partial answers. I wish Apple would summarize all the different possibilities in one page.

In my case, out went the "p" and then the ENTER key. (Survival trick: use the Keyboard Viewer to enter ENTER or any other key. If you are logged out I was not able to figure out how to enter "p" in my password using and ALT-### format ...).

So ... I did all the recommended resets (PRAM,SMC,safe mode reboot,upgrading to High Sierra). I checked that no System Settings were incorrect, added other language keyboards, upgraded to High Sierra. 

Finally, I decided to risk going with the tools for the first time into my keyboard, removed and cleaned the "p" with help of this YouTube video, the best among many I saw. (Note not all keys are created equal and that several articles say the control keys —SPACE, ENTER, SHIFT, ALT, OPTION— are harder to put back in as they have a pin). 

And ... nothing. 

One article (which I cannot find now) had very useful pictures of the transparent film under the keys, which explains why keys that are in the same row tend to fail together. This film has gold conductive paint that follows a horizontal serial path on one side, so if there is corrosion or a mechanical problem in one key, it is likely to affect (or start affecting) keys in the same row, like when a bulb fails in a Christmas light with only two cables.

As the problem is intermittent, I discovered by chance that closing the lid, and putting the laptop vertically and putting pressure on both ends fixes the "p" and ENTER problems temporarily. I think my problem is the battery, which is 2-3 years old and at some point I've read that they start swelling.