How does a keyboard translate our inputs?

Asked 07-Oct-2023
Updated 10-Oct-2023
Viewed 190 times

1 Answer


0

When you press a key on your keyboard, it sends a signal to the computer's CPU. The CPU then uses this signal to determine which key you pressed and what character to display on the screen.

The process of translating keyboard inputs into characters is as follows:

  1. When you press a key on your keyboard, a switch beneath the key closes, and current flows into a small chip in the keyboard.
  2. Each key has a unique scan code number, which corresponds to its position on the keyboard. The keyboard transmits this number as binary data to the computer's CPU.
  3. The CPU is running the operating system (OS), which constantly checks for key presses. As soon as the OS detects a key press, it immediately reacts and figures out where the data needs to go.
  4. The OS knows what software was active when the key was pressed, and based on this information, creates an event. An event is an action recognized and handled by software. Events often originate from computers' hardware.
  5. Your OS knows the layout for your keyboard. It matches the scan code to the key pressed and the associated letter, converting the scan code into a Unicode number.
  6. Your text editing software then captures the event from the operating system.
  7. Based on the choice of font, the software converts the Unicode number into an image. The software creates a binary representation of the image and sends it back to theCPU.
  8. The CPU forwards the binary representation to the Graphics Processing Unit (GPU).
  9. The GPU renders the image and displays it on the screen.

This process happens very quickly, and we don't even notice it happening. However, it is a complex process that involves many different components working together.

It is also important to note that the keyboard layout can vary depending on the language and region. For example, the QWERTY keyboard layout is the most common keyboard layout in the United States, but the AZERTY keyboard layout is the most common keyboard layout in France. The OS will use the keyboard layout that is currently selected by the user.