Apple did not identify a cause for the issues, which they call "behaviors," but they're believed to be caused by dust and other particulates becoming stuck in the butterfly switch mechanism underneath keycaps.
Apple has been servicing affected keyboards free of charge, with the process involving the replacement of one or more keys, or the whole keyboard. For the MacBook Pro, the replacements are second-generation keyboards -- often the 2017 variant with slightly different markings on the Control and Option keys.
Then, last week, Apple surprised us with new 2018 MacBook Pro models that feature an "improved third-generation keyboard for quieter typing." These models are not eligible, at least not now, for Apple's service program.
Apple hasn't directly acknowledged whether the quieter, third-generation keyboards dually address the keyboard issues, but iFixit discovered the 2018 MacBook Pro has a thin, silicone barrier underneath each key, which they believe are intended to prevent the dust and crumbs from getting stuck.
For this reason, some customers have been hoping that Apple will start swapping out second-generation keyboards with third-generation keyboards, as part of its service program, but MacRumors has learned that isn't the plan.
When asked if Apple Stores and Apple Authorized Service Providers will be permitted to replace second-generation keyboards on 2016 and 2017 MacBook Pro models with the 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 quietly tweaked the second-generation keyboard to be more reliable. It wouldn't really make sense for Apple to replace keyboards with ones that are just as prone to break again, especially if the third-generation keyboards offer a fix.
One possibility is that the third-generation keyboards aren't backwards compatible with 2016 and 2017 MacBook Pro models to begin with. The keyboard is actually one part of a larger component called the "top case," which has a glued-in battery, and this part may have changed slightly in 2018 models.
Of course, it is possible that a few customers who send in their 2016 or 2017 MacBook Pro may end up with a third-generation keyboard in rare circumstances, should it prove to be compatible, at the discretion of Apple Stores and Apple Authorized Service Providers. We'll have to wait and see.
To initiate a repair, head to the Contact Apple Support portal, select Mac → Mac notebooks → Hardware Issues → Keyboard not working as expected → Bring in for Repair and book an appointment with an Apple Store or Apple Authorized Service Provider. Remember to back up your Mac before any servicing.