OS X El Capitan: If keys on your keyboard don’t work
If your Mac doesn’t respond when you press the keys on your keyboard, or if pressing some keys has unexpected results, try the following.
If no keys work on an external keyboard
Disconnect and reconnect the keyboard. Make sure the connector is completely inserted into the port.
Connect your keyboard to a different USB port or to a different Mac. If this solves the problem, your Mac may need to be repaired. Take it to an Apple Retail Store or an authorized service provider.
Connect a different keyboard to this Mac. If this solves the problem, you may need to take your keyboard in for service.
If some keys on your portable computer’s built-in keyboard don’t work
If the keyboard produces only numbers, make sure the Num Lock key’s indicator light is off. Press the Num Lock key to turn its light off.
If the Num Lock key doesn’t have an indicator light, press the key and try the keyboard again.
If none of the keys work, your Mac may be showing a low battery alert that you can’t see. Connect your Mac to an electric outlet or connect an external keyboard to your Mac to see the alert.
If the Media Eject key or Caps Lock key doesn’t work
Try holding down the key longer. These keys have a slight delay to prevent an immediate response if they’re pressed accidentally. Hold down the Media Eject key until the Media Eject icon appears on your screen, and hold down the Caps Lock key until the key’s indicator light lights up.
If other keys don’t work
You may have accidentally set an option that changes how your keyboard operates.
Choose Apple menu > System Preferences, click Dictation & Speech, then click Text to Speech. If “Speak selected text when the key is pressed” is selected, deselect it or click Change Key to select another key.
Choose Apple menu > System Preferences, click Accessibility, then click Keyboard. Make sure Slow Keys is turned off. If Slow Keys is on, you must hold down a key longer than usual before it’s recognized.
Choose Apple menu > System Preferences, click Accessibility, then click Mouse & Trackpad. Make sure Mouse Keys is off. If Mouse Keys is on, pressing keys in the numeric keypad moves the pointer instead of entering numbers.
Choose Apple menu > System Preferences, click Keyboard, then click Input Sources. Select “Show Input menu in menu bar.” Open the Input menu, then make sure the correct keyboard layout is selected.
To see the keyboard layout, click Keyboard, then choose “Show Keyboard, Emoji, & Symbols Viewers in menu bar.”