The right way to fix your MacBook keyboard if it isn't responding

If you've tried all the steps above without success, there are still a few options left. Start by connecting an external keyboard to your MacBook so you can be sure the problem is with the built-in keyboard and not caused by macOS. Booting your Mac in safe mode can help confirm whether a third-party app is interfering with your keyboard. Shut down your Mac normally from the Apple menu (don't just put it into Sleep Mode), then press and hold the power button until you see Loading startup options. Select your startup disk, press and hold the Shift key, then click Continue in Safe Mode. Running Apple Diagnostics is also an option.

If only one or two keys are malfunctioning, the most likely cause is debris stuck in the key mechanism. You can try cleaning the keyboard by holding your MacBook at a 75-degree angle and using compressed air, then rotating the laptop and repeating the process. Another option is to turn your MacBook upside down and gently tap the back cover to push the dirt out of the keyboard. Don't try to remove the keycaps on your own, as you could end up permanently damaging the key mechanism — the parts are very small and delicate.

Your last resort is to book an appointment with Apple Support, where a specialist will examine your MacBook to determine whether it needs a keyboard replacement. Older MacBooks released between 2015 and 2019 became notorious for problems with the "butterfly" keyboard, which was more prone to getting stuck due to small particles of dirt. But even the latest MacBooks can suffer from keyboard issues over time, so a replacement may be necessary.