Prev NEXT

How Computer Keyboards Work

From the Keyboard to the Computer

A PS/2 type keyboard connector.

As you type, the processor in the keyboard analyzes the key matrix and determines what characters to send to the computer. It maintains these characters in itsmemorybufferand then sends the data.

Many keyboards connect to the computer through a cable with a PS/2 orUSB (Universal Serial Bus)connector.Laptopsuse internal connectors. Regardless of which type of connector is used, the cable must carry power to the keyboard, and it must carry signals from the keyboard back to the computer.

Advertisement

Wireless keyboards, on the other hand, connect to the computer throughinfrared(IR),radio frequency(RF) orBluetoothconnections. IR and RF connections are similar to what you'd find in aremote control. Regardless of which sort of signal they use, wireless keyboards require areceiver, either built in or plugged in to the USB port, to communicate with the computer. Since they don't have a physical connection to the computer, wireless keyboards have an AC power connection or usebatteriesfor power.

Microsoft wireless keyboard
这个微软无线键盘电池-powered.

Whether it's through a cable or wireless, the signal from the keyboard is monitored by the computer'skeyboard controller. This is an integrated circuit (IC) that processes all of the data that comes from the keyboard and forwards it to the operating system. When theoperating system(OS) is notified that there is data from the keyboard, it checks to see if the keyboard data is asystem level command. A good example of this isCtrl-Alt-删除on a Windows computer, which reboots the system. Then, the OS passes the keyboard data on to the current application.

The application determines whether the keyboard data is a command, likeAlt-f, which opens the File menu in a Windows application. If the data is not a command, the application accepts it ascontent, which can be anything from typing a document to entering a URL to performing a calculation. If the current application does not accept keyboard data, it simply ignores the information. This whole process, from pressing the key to entering content into an application, happens almost instantaneously.

To learn more about computers and keyboards, check out the links below.

Related HowStuffWorks Articles

More Great Links

Sources

  • PC Guide: Keyboards http://www.pcguide.com/ref/kb/index.htm
  • PC World: How to Buy Input Devices http://www.pcworld.com/howto/bguide/0,guid,19,page,1,00.asp