Professional Documents
Culture Documents
CSC347 Lecture-5 Input Devices
CSC347 Lecture-5 Input Devices
CSC347 Lecture-5 Input Devices
When you look at all the extras and options that are available for new computer keyboards, it can
be hard to believe that their original design came from mechanical typewriters that didn't even use
electricity. Now, you can buy ergonomic keyboards that bear little resemblance to flat, rectangular
models with ordinary square keys. Some flashier models light up, roll up or fold up, and others
offer options for programming your own commands and shortcuts.
But no matter how many bells and whistles they offer, most keyboards operate using similar
technology. They use switches and circuits to translate a person's keystrokes into a signal a
computer can understand.
Keyboard Basics
A keyboard's primary function is to act as an input device. Using a keyboard, a person can type a
document, use keystroke shortcuts, access menus, play games and perform a variety of other tasks.
Keyboards can have different keys depending on the manufacturer, the operating system they're
designed for, and whether they are attached to a desktop computer or part of a laptop. But for the
most part, these keys, also called keycaps, are the same size and shape from keyboard to keyboard.
They're also placed at a similar distance from one another in a similar pattern, no matter what
language or alphabet the keys represent.
Figure 1 shows the keys on the keyboard. Most keyboards have between 80 and 110 keys,
including:
• Typing keys
• A numeric keypad
• Function keys
• Control keys
The typing keys include the letters of the alphabet, generally laid out in the same pattern used for
typewriters. According to legend, this layout, known as QWERTY for its first six letters, helped
keep mechanical typewriters' metal arms from colliding and jamming as people typed. Some
people question this story --whether it's true or not, the QWERTY pattern had long been a standard
by the time computer keyboards came around. Figure 1 shows a QWERTY keyboard.
IUBAT – International University of Business Agriculture and Technology
Keyboards can also use a variety of other typing key arrangements. The most widely known is
Dvorak, named for its creator, August Dvorak. The Dvorak layout places all of the vowels on the
left side of the keyboard and the most common consonants on the right. The most commonly used
letters are all found along the home row. The home row is the main row where you place your
fingers when you begin typing. People who prefer the Dvorak layout say it increases their typing
speed and reduces fatigue. Other layouts include ABCDE, XPeRT, QWERTZ and AZERTY.
Each is named for the first keys in the pattern.
The numeric keypad is a more recent addition to the computer keyboard. As the use of computers
in business environments increased, so did the need for speedy data entry. Since a large part of the
data was numbers, a set of 17 keys, arranged in the same configuration found on adding machines
and calculators, was added to the keyboard.
In 1986, IBM further extended the basic keyboard with the addition of function and control keys.
Applications and operating systems can assign specific commands to the function keys. Control
keys provide cursor and screen control. Four arrow keys arranged in an inverted T formation
between the typing keys and numeric keypad move the cursor on the screen in small increments.
Other common control keys include:
• Home
• End
• Insert
• Delete
• Page up
• Page Down
• Control (Ctrl)
• Alternate (Alt)
• Escape (Esc)
The Windows keyboard adds some extra control keys: two Windows or Start keys, and an
Application key. Apple keyboards, on the other hand, have Command (also known as "Apple")
keys. A keyboard developed for Linux users features Linux-specific hot keys, including one
marked with "Tux" the penguin -- the Linux logo/mascot.
A keyboard is a lot like a miniature computer. It has its own processor and circuitry that carries
information to and from that processor. A large part of this circuitry makes up the key matrix.
The key matrix is a grid of circuits underneath the keys. In all keyboards (except for capacitive
models, which we'll discuss in the next section), each circuit is broken at a point below each key.
When you press a key, it presses a switch, completing the circuit and allowing a tiny amount of
current to flow through. The mechanical action of the switch causes some vibration, called bounce,
which the processor filters out. If you press and hold a key, the processor recognizes it as the
equivalent of pressing a key repeatedly.
When the processor finds a circuit that is closed, it compares the location of that circuit on the key
matrix to the character map in its read-only memory (ROM). A character map is basically a
comparison chart or lookup table. It tells the processor the position of each key in the matrix and
what each keystroke or combination of keystrokes represents. For example, the character map lets
the processor know that pressing the a key by itself corresponds to a small letter "a," but the Shift
and a keys pressed together correspond to a capital "A."
A computer can also use separate character maps, overriding the one found in the keyboard. This
can be useful if a person is typing in a language that uses letters that don't have English
equivalents on a keyboard with English letters. People can also set their computers to interpret
their keystrokes as though they were typing on a Dvorak keyboard even though their actual keys
CSC 347 – DAS Lecture 5 Input Devices 3|P a ge
IUBAT – International University of Business Agriculture and Technology
are arranged in a QWERTY layout. In addition, operating systems and applications have keyboard
accessibility settings that let people change their keyboard's behavior to adapt to disabilities.
Take off the keyboard's bottom panel, it shows the transparent plastic contact layers (see fig. 3)
that detect key presses and (through those layers) the round bars poking the keys down from above.
The green rectangle at the top contains three small LEDs that activate the indicator lights for "Num
lock", "Caps lock", and "Scroll lock". The cable running along the inside of the case at the top of
the keyboard carries electrical signals from the keyboard to the computer's USB port (or PS/2 port
on older machines).
When a key of the keyboard is pressed, the top and bottom contact layers come together and the
keyboard sends a signal to computer as shown in figure 7.
Keyboard Switches
All of the other types of switches used in keyboards are mechanical in nature. Each provides a
different level of audible and tactile response -- the sounds and sensations that typing creates.
Mechanical key switches include:
• Rubber dome
• Membrane
• Metal contact
• Foam element
Rubber dome switches are very common. They use small, flexible rubber domes, each with a
hard carbon center. When you press a key, a plunger on the bottom of the key pushes down against
the dome, and the carbon center presses against a hard, flat surface beneath the key matrix. As
long as the key is held, the carbon center completes the circuit. When the key is released, the rubber
dome springs back to its original shape, forcing the key back up to its at-rest position. Rubber
dome switch keyboards are inexpensive, have pretty good tactile response and are fairly resistant
to spills and corrosion because of the rubber layer covering the key matrix.
Rather than having a switch for each key, membrane keyboards use a continuous membrane that
stretches from one end to another. A pattern printed in the membrane completes the circuit when
you press a key. Some membrane keyboards use a flat surface printed with representations of each
key rather than keycaps.
Membrane keyboards don't have good tactile response, and without additional mechanical
components they don't make the clicking sound that some people like to hear when they're typing.
However, they're generally inexpensive to make.
Metal contact and foam element keyboards are increasingly less common. Metal contact switches
simply have a spring-loaded key with a strip of metal on the bottom of the plunger. When the key
is pressed, the metal strip connects the two parts of the circuit. The foam element switch is basically
the same design but with a small piece of spongy foam between the bottom of the plunger and the
metal strip, providing a better tactile response. Both technologies have good tactile response,
make satisfyingly audible "clicks," and are inexpensive to produce. The problem is that the
contacts tend to wear out or corrode faster than on keyboards that use other technologies. Also,
there is no barrier that prevents dust or liquids from coming in direct contact with the circuitry of
the key matrix.
Different manufacturers have used these standard technologies, and a few others, to create a wide
range of non-traditional keyboards. We'll take a look at some of these non-traditional keyboards
in the next section.
Non-Traditional Keyboards
A lot of modifications to the traditional keyboard design are an attempt to make them safer or
easier to use. For example, some people have associated increased keyboard use with
repetitive stress injuries like carpal tunnel syndrome, although scientific studies have
produced conflicting results. Ergonomic keyboard designs are intended to keep a person's
hands in a more natural position while typing in an attempt to prevent injuries. While these
keyboards can certainly keep people from holding their hands in a "praying mantis" position,
studies disagree on whether they actually prevent injury.
The simplest ergonomic keyboards look like traditional keyboards that have been divided
down the middle, keeping a person's hands farther apart and aligning the wrists with the
forearms. More complex designs place the two halves of the keyboard at varying angles to
one another and to the surface on which the keyboard rests. Some go even further, placing
the two halves of the keyboard on the armrests of chairs or making them completely
perpendicular to the desk surface. Others, like the Datahand, don't look much like keyboards
at all.
Some modifications, while not necessarily ergonomic, are designed to make keyboards more
portable, more versatile or just cooler:
• Das Keyboard is a completely black keyboard with weighted keys that require more
pressure from a person's strongest fingers and less pressure from the weaker ones.
• The Virtual Laser Keyboard projects a representation of a keyboard onto a flat surface.
When used successfully, a person's fingers pass through the beam of infrared light above
the projected surface, and a sensor interprets it as a keystroke.
• The True-touch Roll-up keyboard is flexible and can be rolled up to fit in a backpack
or bag.
• Illuminated keyboards, like the Ion Illuminated Keyboard, use light-emitting diodes
or electroluminescent film to send light through the keys or the spaces between keys.
• The Optimus keyboard has organic light-emitting diodes (OLEDs) in the keys. Users
can change what letter, command or action each key represents, and the OLED can change
to display the new information.
With the exception of the Virtual Laser Keyboard, which has its own sensing system, each of
these keyboards uses the same type of technology as traditional models do to communicate
with the computer. We'll look at that technology next.
Wireless keyboards, on the other hand, connect to the computer through infrared (IR), radio
frequency (RF) or Bluetooth connections. IR and RF connections are similar to what you'd find
in a remote control. Regardless of which sort of signal they use, wireless keyboards require a
receiver, 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 use batteries for power.
Whether it's through a cable or wireless, the signal from the keyboard is monitored by the
computer's keyboard 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 the operating system
(OS) is notified that there is data from the keyboard, it checks to see if the keyboard data
is a system level command. A good example of this is Ctrl-Alt-Delete 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, like Alt-f, which opens
the File menu in a Windows application. If the data is not a command, the application accepts
it as content, 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.
The WIN keys open the Windows Start menu, which you can then navigate with the cursor keys.
The Application key simulates the right mouse button; in most applications, it brings up a context-
sensitive pop-up menu. Several WIN key combinations offer preset macro commands as well. For
example, you can press WIN+E to launch the Windows Explorer application. Table 1 shows a list
of common Windows key combinations used with the 104-key keyboard.
■ Defective cables
■ Stuck keys
Many older keyboards, such as the heavy-duty units made by IBM, had replaceable cables.
Defective cables are easy to spot if the failure is not intermittent. If the keyboard stops working
altogether or every keystroke results in an error or incorrect character, the cable is likely the culprit.
Troubleshooting is simple if your keyboard has a detachable cable, especially if you have a spare
cable on hand. Simply replace the suspected cable with one from a known, working keyboard to
verify whether the problem still exists. If it does, the problem must be elsewhere.
Most modern keyboards have non-replaceable cables, at least from the outside. In some cases you
can open the keyboard case, and you will see that the cable is internally connected via a removable
plug. Unfortunately, those cables are not sold separately, meaning that the only source for one
would be from another keyboard, making a replacement implausible.
If the cable is removable, you can test it for continuity with a digital multi-meter (DMM). DMMs
that have an audible continuity tester built in make this procedure much easier to perform. To test
each wire of the cable, insert the DMM’s red pin into the keyboard connector and touch the DMM’s
black pin to the corresponding wire that attaches to the keyboard’s circuit board. Wiggle the ends
of the cable as you check each wire to ensure no intermittent connections exist. If you discover a
problem with the continuity in one of the wires, replace the cable or the entire keyboard, whichever
is cheaper. Because replacement keyboards are so inexpensive, it’s almost always cheaper to
replace the entire unit than to get a new cable, unless the keyboard is an expensive unit like an
older IBM Model M. You can get replacement cables (and other parts) for older IBM Model M
type keyboards from www.clickykeyboards.com.
Many times you first discover a problem with a keyboard because the system has an error during
the POST. Many systems use error codes in a 3xx numeric format to distinguish the keyboard. If
you encounter any such errors during the POST, write them down. Some BIOS versions do not
use cryptic numeric error codes; they simply state something such as the following:
For a simple test of the motherboard keyboard connector, you can check voltages on some of the
pins. Measure the voltages on various pins of the keyboard connector by using appropriate tool.
To prevent possible damage to the system or keyboard, turn off the power before disconnecting
the keyboard. Then, unplug the keyboard and turn the power back on. Make measurements
between the ground pin and the other pins accordingly. If the voltages are within the keyboard
signals and specifications, the motherboard keyboard circuitry is probably okay. If your
measurements do not match the given voltages, the motherboard might be defective. Otherwise,
the keyboard cable or keyboard might be defective. If you suspect that the keyboard or cable is the
problem, the easiest thing to do is to connect a known-good keyboard as a test. If the system works
properly with the known-good keyboard, you know the original keyboard or cable is defective. If
the system still does not work normally, you might have to replace the motherboard.
In many newer systems, the motherboard’s keyboard and mouse connectors are protected by a fuse
that you can replace. Look for any type of fuse on the motherboard in the vicinity of the keyboard
or mouse connectors. Other systems might have a socketed keyboard controller chip (8042-type).
In that case, you might be able to repair the motherboard keyboard circuit by replacing this chip.
Because these chips have ROM code in them, you should get the replacement from the
motherboard or BIOS manufacturer. If the motherboard uses a soldered keyboard controller chip
or a chipset that integrates the keyboard controller with other I/O chips, you need to replace the
motherboard.
Pointing Devices
The mouse was invented in 1964 by Douglas Engelbart, who at the time was working at the
Stanford Research Institute (SRI), a think tank sponsored by Stanford University. The mouse was
officially called an X-Y Position Indicator for a Display System. A mouse is something you push
along your desktop to make a cursor (pointing device) move on your screen. A mouse has to figure
out how much you are moving your hand along with which direction. There are two main kinds of
mice and they do this job in two different ways, either using a rolling rubber ball (in a ball-type
mouse) or by bouncing a light off your desk (in an optical mouse).
Ball-Type Mice
The bottom of the mouse housing is where the detection mechanisms or electronics are located.
On traditional mice, the bottom of the housing contains a small, rubber ball that rolls as you move
the mouse across the tabletop. The movements of this rubber ball are translated into electrical
signals transmitted to the computer across the cable.
Traditional mouse have a rubber ball inside them. Figure 8 shows the inside of an old-style
Logitech ball mouse where heavy ball can be seen clearly. The components of the mouse are:
6. X-axis wheel turns when you move mouse left and right.
7. Y-axis wheel turns when you move mouse up and down.
8. Heavy rubber wheel.
9. Spring presses rubber ball firmly against X- and Y-axis wheels so they register
movements properly.
10. Electrolytic capacitor
11. Resistors.
Internally, a ball-driven mouse is simple. The ball usually rests against two rollers: one for
translating the x-axis movement and the other for translating the y-axis movement. These rollers
are typically connected to small disks with shutters that alternately block and allow the passage of
light. Small optical sensors detect movement of the wheels by watching an internal IR light blink
on and off as the shutter wheel rotates and “chops” the light. These blinks are translated into
movement along the axes. Ball type mice are considered obsolete today, although many are still in
use.
Optical Mice
An optical mouse works in a completely different way. It shines a bright light down onto your desk
from an LED (light-emitting diode) mounted on the bottom of the mouse. The light bounces
straight back up off the desk into a photocell (photoelectric cell), also mounted under the mouse,
a short distance from the LED. The photocell has a lens in front of it that magnifies the reflected
light, so the mouse can respond more precisely to your hand movements. As you push the mouse
around your desk, the pattern of reflected light changes, and the chip inside the mouse uses this to
figure out how you're moving your hand.
Some optical mice have two LEDs. The first one shines light down onto the desk. The light from
that is picked up by the photocell. The second LED lights up a red plastic strip along the back of
the mouse so you can see it is working. Most optical mice also have a wheel at the front so you
can scroll pages on-screen much faster. You can click the wheel too, so it functions like the third
(center) button on a conventional ball mouse.
An optical mouse is much more hi-tech than a ball mouse. Where a ball mouse has quite a few
moving parts, an optical mouse is almost entirely electronic (it has almost no moving parts).
Figure 9 shows the inside of a typical optical mouse and a few of the main components. The most
interesting bits are in the center (where the LED light shines down onto your desk) and at the front
(where button presses are detected by switches):
Figure 10. The light-guide (just the right of the black chip) carries light from the LED down to
your desktop. It's a bit like a prism, but it's made from lightweight plastic and there's a small lens
mounted at the very end where the guide faces the LED.
The connector that attaches your mouse to the system depends on the type of interface you are
using. Mice are most commonly connected to your computer through the following interfaces:
in 1987, so this interface is often referred to as a PS/2 mouse interface. This term does not
imply that such a mouse can work only with a PS/2; instead, it means the
mouse can connect to any system that has a dedicated mouse port on the motherboard.
USB port: The extremely flexible USB port has become the most popular port to use for
mice as well as keyboards and other I/O devices. Compared to the other interfaces, USB
mice (and other USB pointing devices such as trackballs) have the following advantages:
a) USB mice move much more smoothly than the traditional PS/2 type, b) USB mice and
pointing devices, similar to all other USB devices, are hot-swappable, c) Multiple pointing
devices, and d) USB mice can be attached to a USB hub.
Bluetooth/wireless: Transceiver connected via USB.
Mouse Troubleshooting
If you are experiencing problems with your mouse, you need to look in only two general places –
hardware and software. Because mice are simple devices, looking at the hardware takes little time.
Detecting and correcting software problems can take a bit longer, however. If your system refuses
to recognize the mouse, try using a different mouse that you know works. If that doesn’t resolve
the problem, the port you are connecting the mouse to might be bad. If the mouse is connected via
USB, try a different USB port. If a motherboard-based PS/2 mouse port goes bad, you can replace
the entire motherboard – which is usually expensive – or you can just use a USB
mouse instead.
A bad PS/2 interface mouse problem can be caused the system to lock right as the driver loaded
or when third-party diagnostics were being run on the system. Try unplugging the mouse to see if
the system will boot; if it does, the mouse or PS/2 mouse port (meaning the motherboard) may be
the problem.
Wireless Mouse
There's nothing particularly special about wireless mice. They figure out your hand movements in
exactly the same way, but send the data to your computer using a wireless connection
(typically Bluetooth) instead of a USB cable. USB doesn't only carry data: it also provides the
power for small plug-in devices like mice. Without that power, wireless mice obviously need one
or more batteries (which adds a hidden running cost) and are therefore slightly heavier than wired
ones (not that that matters much when they're on your desk). Bluetooth connections can be battery
CSC 347 – DAS Lecture 5 Input Devices 16 | P a g e
IUBAT – International University of Business Agriculture and Technology
hogs so you might find yourself replacing your mouse batteries more often than you'd like; once
every couple of months seems typical, though if you're using rechargeable, that might fall to once
a week—and some mice boast battery life of 12–24 months. If you use your computer constantly,
what will you do if your mouse batteries suddenly run flat? If you use rechargeable, that's going
to happen more often and be more of an issue. Fortunately, some mice do have battery-level
indicators or ways of warning you when the batteries are about to give out. Even so, you might
prefer the reliability, cheapness, and environmentally friendliness of a wired mouse over a wireless
one.
■ Disconnected transceiver—If you have moved the computer around, you might have
disconnected the transceiver from its keyboard, PS/2 mouse, serial, or USB port. You can
plug a USB device in without shutting down the system, but the other types require you to
shut down the PC, reattach the cable, and restart the PC to work correctly.
■ USB Legacy support not enabled—If your wireless keyboard uses a transceiver
connected to the USB port and the device works in Windows but not at a command prompt,
make sure you have enabled USB Legacy support in the BIOS, or use the PS/2 connector
from the transceiver to connect to the PS/2 keyboard port.