If your Mac doesn’t respond to key presses, 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. If Slow Keys is on, you must press and hold a key longer than usual before it’s recognized.
Choose Apple menu > System Settings, click Accessibility in the sidebar, then click Pointer Control on the right. (You may need to scroll down.) Make sure Mouse Keys is off.