How does a keyboard work?

From Input to Delivery, how your Computer knows which key you pressed.

Steve Smith talks about one of the most used HID devices, the keyboard, and how your Computer knows which key you pressed.

Episode #6-13 released on November 29, 2015

Watch on Youtube

Keyboards are based on typewriters that used mechanical motion to add text to paper. However, the idea of the typewriter was transferred over to computers, with a twist, instead of writing to paper, a signal is sent to the computer.

Your keyboard is actually a computer, in itself. Yes, I know you think it is part of a computer, but it has its own processor that decodes the interactions of the user with it, much like a computer does. A keyboard is part of a class of devices called human interface devices, or HID for short.

Keyboards come in many configurations, and while many sources will give estimates to the number of keys a keyboard may have, today, there are plenty of keyboards out there that break the mold.

Let's talk about the different kinds of keys on keyboards. We have the typing, numeric, function and control keys on all keyboards. These are all standard. We, also, have macro keys, and media keys in some cases for other kinds of tasks.

What a keyboard does, with the help of the computer, is allow the user to interact with an operating system. This means that the keyboard needs some way to tell the computer which key is pressed, but it also needs to know this first, before sending the information to the computer.

When a key is depressed or its position detected depending on the keyboard type, the keyboard's processor uses a character map to determine the correct input used by the user, and then forwards this to the computer. The key being pressed produces a scanning code that is then converted in binary code used by the computer itself, which can be converted to an ASCII value, as well. If you can successfully convert the binary code into ASCII, you can easily determine the ALT code, which is now useful for UTF-8 based systems, and web-sites.

This is basically, how a keyboard works. You press a key, the keyboard's processor determines the scanning code from the character map, generates a binary value sent to the computer, and the operating system reacts accordingly.

Host : Steve Smith | Music : Jonny Lee Hart | Editor : Steve Smith | Producer : Zed Axis Productions

Sources & Resources

Community Comments

Share your thoughts, opinions and suggestions

Login or Register to post Your comment.