A computer keyboard is an input device that allows a person to enter letters, numbers, and other symbols (together, these are called characters) into a computer. It is one of the most used input devices for computers. Using a keyboard is often called typing.

A keyboard contains many mechanical switches or push-buttons called "keys". When one of these are pushed, an electrical circuit is closed, and the keyboard sends a signal to the computer that tells it what letter, number or symbol it would like to be shown on the screen. The computer then shows the character on the screen, usually at the place where the flashing text cursor is. 

Besides entering characters, computer keyboards also have special keys that change the symbol (such as shift or caps lock) or give the computer special commands (such as the arrow keys, CTRL and ALT). Different computer operating systems use different special keys, or use them differently. Special commands can also be activated through combinations of keys, called keyboard shortcuts. Some of the most common shortcuts on Windows programs are: Ctrl + C, to copy some text or a picture; Ctrl + V, to paste what was copied; and Ctrl + F, to find a certain word on a document or web page.

A keyboard can be joined to a computer using a wire, but can also be wireless (like those that use Bluetooth). Most wired 21st century keyboards connect to a USB socket on the computer, but older ones use a round, purple DIN connector.

Types 

There are different types of keyboards. They can be based on the way the keys work; for example, laptops have keys that do not move a lot, because the keyboard has to be very thin in order to fit inside the laptop. On the other hand, video game players often like keyboards with keys that move a lot, so that they feel the key working. Gaming keyboards also need fast reaction times. In between these two types, an ergonomic keyboard is made to be easier for people to type for long periods of time, without hurting their hands or arms. 

There are also different ways the keys on a keyboard are arranged, usually to deal with different regions and languages of the world.  Most computer keyboards have the keys in six rows, but some laptops use only five or even four rows to save space. The most popular layout is called QWERTY, which is based on the first six letters on them. The QWERTY design was made so that the most common letters would not make the moving parts of a mechanical typewriter "jam", or stop working. Now, even though most people do not use typewriters anymore, the design stayed because people were used to it. Other layouts have been developed, for example the Dvorak keyboard, which puts the most common letters in the places that are easiest to reach.

Risks 
Keystroke logging is making a record of each key that is pressed.  Keystroke logging can be used to measure employee activity.  Hackers can also use keystroke logging to get private information, such as passwords.  This can be done by putting a piece of hardware in the keyboard or on the cable, or by installing malware in the computer.  A wireless keyboard makes it especially easy for the hacker to detect the wireless signals.

The use of any keyboard may cause repetitive strain injury to the hands, wrists, arms, neck or back.  The risks of injuries can be reduced by taking frequent, short breaks to get up and walk around, a couple of times every hour. Users should also vary tasks throughout the day, to avoid overuse of the hands and wrists. When using a keyboard, a person should keep the shoulders relaxed with the elbows at the side, with the keyboard and mouse positioned so that they are comfortable to use. The chair height and keyboard should be adjusted so that the wrists are straight, and not resting on sharp edges of tables or the computers themselves. Some technology ranging from special keyboards to pen-tablet interfaces or speech recognition software can reduce the risk of injury. Pause software reminds the user to pause frequently.

Researchers are studying if keyboards can spread diseases.  Some keyboards were found to contain five times more germs than a toilet seat.

Related pages 

Computer mouse
QWERTY
Dvorak (keyboard layout)

References

Computer hardware
Writing tools
Data input