If your keyboard keys stop working, it doesn't necessarily mean they're broken or need replacement. From checking keyboard ...
If your iPad's onscreen keyboard isn't working, you might need to activate it in Settings. Your external keyboard might also conflict with the onscreen keyboard, so turn it off or disable Bluetooth.
Apple today released updated firmware for several accessories, including the 140W USB-C Power Adapter, the Magic Trackpad 2, ...