If your MacBook (2015 and later) or MacBook Pro (2016 and later) has an unresponsive key, or a key that feels different than the other keys when you press it, follow these steps to clean the keyboard with compressed air.
https://support.apple.com/en-us/HT205662
As you follow these steps, remember to use the straw included with the compressed air to control airflow, and keep the end of the straw about a half-inch away from the keyboard as you spray. Also remember to not invert the air can while you're spraying.
1. Hold your Mac notebook at a 75-degree angle, so it's not quite vertical.

2. Use compressed air to spray the keyboard, or just the affected keys, in a left-to-right motion.

3.Rotate your Mac notebook to its right side and spray the keyboard again, from left to right.

4.Repeat the action, this time with your Mac notebook rotated to its left side.

Learn more
- If any keys are still unresponsive after you've followed these steps, visit an Apple Retail Store or Apple Authorized Service Provider for service.
- Learn more about cleaning your other Apple products.