Why is my MacBook not typing correctly?
The most common causes for a MacBook keyboard to stop working are dust and other contaminants. If you have a MacBook with keys using Apple's butterfly keyboard mechanism, even the smallest amount of dust contamination can cause problems.
Resetting the Driver to Default Settings
Open the dropdown menu and press “System Preferences.” Click on the keyboard icon. In the bottom right corner, there will be a box that says “Modifier Keys.” Click that. Press the option to “Restore Defaults,” then click OK.
Hold down the Shift and Option keys ('Alt' on some keyboards) and at the same time click on the Bluetooth icon in the menu bar. Once the menu is showing, release the keys. From the Bluetooth menu, choose Debug > Remove All Devices. Reboot your Mac, then setup your keyboard and/or mouse as normal.
An outdated or corrupt driver could be the reason your keyboard isn't working. Step 1: Right-click on Start and select Device Manager. Step 2: Expand Keyboards. Step 3: Right-click on the affected keyboard and select Update driver.
If your keyboard's driver is outdated, your computer will struggle to communicate with the hardware. As such, an outdated driver is a possible cause of your keyboard input lag. There are a few ways to find and replace outdated Windows drivers. The most common method is using the Device Manager.
If your laptop keyboard is not working properly, there are several things you can check to troubleshoot. See if restarting your laptop solves the problem, and thoroughly clean the keyboard. You can also check to see if your keyboard driver and layout settings need to be changed.
Go to settings > general > keyboard > hardware keyboard and tap over at the right edge and make sure you have it set to the layout you want (and NOT "automatic").
On personal computers, the reset button clears the memory and reboots the machine forcibly. Reset buttons are found on circuit breakers to reset the circuit. This button can cause data corruption which is why it often doesn't exist on many machines.
If other keys don't work
You may have accidentally set an option that changes how your keyboard operates. Choose Apple menu > System Settings, click Accessibility in the sidebar, then click Keyboard on the right. (You may need to scroll down.) Make sure Slow Keys is turned off.
Dust, dirt, hair, and other debris can fall into the keyboard over time and obstruct a key's movement or interfere with its circuitry. Try removing the key that isn't working, and clean the area under and around it.
Why is my Apple iPhone keyboard glitching?
If your iPhone keyboard is flickering, check if something's interfering with it. Then update your iPhone and apps to the latest version. If you're using third-party keyboards, uninstall them and use the built-in iOS keyboard instead. If the issue persists, reset your iPhone settings, and contact Apple Support.
From the Start menu, search for "Ease of Access Keyboard," and enter that menu. If Use Filter Keys is turned on, toggle it off to see if it helps. Similarly, if your keyboard is behaving strangely, make sure Use Sticky Keys is also turned off in this menu.

There are many possible reasons as to why your iPhone keyboard suddenly gets laggy or stuck. Often times, this could happen when the iPhone keyboard app has crashed, when triggered by some software glitches including bad apps or faulty updates, and likewise when the phone is enduring some display/screen problems.
Sometimes the receiver gets out of sync with the wireless devices, causing them to stop working. Resyncing the setup is fairly easy. There is usually a Connect button somewhere on the USB receiver. Press that, and a light on the receiver should start flashing.
Your keyboard driver might be outdated or corrupt which is why there are some communication issues between the keyboard and the PC. To fix it, you should update the driver: Right-click Start > Device manager. Extend the Keyboard menu.
Ghosting is the problem that some keyboard keys don't work when multiple keys are pressed simultaneously. The keystrokes that don't show up on the computer or seem to have disappeared are said to have been “ghosted”.