Apple did not identify a cause of the problems, which they call "behaviors," but they are thought to be caused by dust and other particles that get trapped in the butterfly switch mechanism beneath the keys.
Apple has been providing services to affected keyboards for free, with the process involving the replacement of one or more keys, or the entire keyboard. For MacBook Pro, replacements are second generation keyboards, often the 2017 variant with slightly different marks on the Control and Option keys.
Then, last week, Apple surprised us with the new MacBook Pro 2018 models that have an "improved third-generation keyboard to write more quietly." These models are not eligible, at least not now, for the Apple service program.
Apple has not directly recognized whether quieter third-generation keyboards address keyboard issues, but iFixit discovered that the MacBook Pro 2018 has a thin silicone barrier under each key, which they believe are intended to prevent dust and crumbs to get stuck.
For this reason, some customers have been waiting for Apple to start trading the second Generating keyboards with third-generation keyboards, as part of their service program, but MacRumors has learned that this is not the plan.
When asked if Apple stores and authorized Apple service providers will be able to replace second-generation keyboards on MacBook Pro 2016 and 2017 models with new third-generation keyboards, if necessary, Apple said no, the third generation keyboards are exclusive to the 2018 MacBook Pro.
Hopefully, in that case, it means that Apple has discreetly adjusted the second-generation keyboard to make it more reliable. It really would not make sense, and it would not feel very Apple, that they continue to use replacement keyboards that are as prone to break as the ones they are replacing.
Of course, some customers who ship their MacBook Pro 2016 or 2017 may end up with a third-generation keyboard in exceptional circumstances, at the discretion of Apple stores and authorized Apple service providers.
To start a repair, go to the Apple contact support portal, select Mac → Mac notebooks → hardware problems → keyboard does not work as expected → Bring it to repair and book an appointment with an Apple Store or a provider authorized Apple services. Remember to make a backup of your Mac before any repair.