You might think the keyboard simply sends the letter of a pressed key to the
computer—after all, that is what appears to happen. Actually, the process of accepting input from the keyboard is more complex, as shown in
Fig. 1.
Fig. 1: How Input is received from the keyboard.
When you press a key, a tiny
chip called the
keyboard controller notes that a key
has been pressed. The keyboard controller places a code into pan of its memory called the
keyboard buffer, to indicate which key was pressed.
A buffer is a temporary storage area that holds data until it can be processed.
The keyboard controller then sends a signal to the computer's
system software, notifying it that
something has happened at
the keyboard.
When the system software receives the signal, it determines the appropriate response. When a
keystroke has occurred, the system reads the
memory location in the keyboard
buffer that contains the code of
the key that was pressed. The system software then passes that
code to the CPU.
The keyboard buffer can store
many keystrokes at one time. This
capability is necessary because
some time elapses between the
pressing of a key and the computer’s reading of that key from
the keyboard buffer. With the keystrokes stored in a buffer, the program can react to them when it is convenient. Of
course, this all happens very quickly. Unless the computer is very busy handling
multiple tasks, you notice no delay between pressing keys and seeing the letters on
your screen.
In some computers, the keyboard controller handles input from the computer's
keyboard and mouse and stores the settings for both devices. One keyboard setting, the repeat rate, determines how long you must hold down an alphanumeric
key before the keyboard will repeat the character and how rapidly the character
is retyped while you press the key. You can set the repeat rate to suit your typing
speed.
Do you want to say or ask something?