Home
Learn Hub
Technology
How does a keyboard send letters to a computer?
💻 Technology

How does a keyboard send letters to a computer?

Test yourself first — take the quiz below, then read the full answer.
QUIZ
How does a keyboard send letters to a computer?

Turning Typing Into Text

The keyboard is one of the most-used parts of a computer. You press a key, and almost instantly the matching letter appears on the screen. It feels completely direct, as if the key itself puts the letter there. But the letter on top of a key is just a printed label. The key does not really contain a letter. So how does pressing it cause the right character to show up on screen?

Every Key Is a Switch

The secret is that each key on a keyboard is really just a switch. A switch is a simple device that either completes an electrical circuit or leaves it open. When a key is sitting up, untouched, its circuit is open and no current flows through it. When you press the key down, it closes the circuit at that spot, allowing a small electrical current to flow. So a keyboard is essentially a large collection of switches, one under every key.

Finding Which Key Was Pressed

Inside the keyboard is a small processor, a little controller chip. Its job is to constantly check all the switches and notice the moment one of them closes. The keys are wired in an organized grid pattern, which lets the controller quickly identify exactly which key was pressed by its position in that grid. The controller is always scanning, ready to catch any key the instant you press it.

Sending the Code

Once the controller knows which key was pressed, it does not send a letter. Instead, it sends a code, a specific number that stands for that particular key, to the computer. The computer receives this code and software then interprets it, deciding to display the letter, type a number, or carry out a command. All of this happens in a tiny fraction of a second, which is why typing feels instant.

Source

This article was written using information from Wikipedia.