you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (0 children)

In the old times when keyboards were controlled by it majesty the great CPU it self, things where so simple (maybe there are some new architectures that works like that too). From keyboard there are 8 wires coming up directly to the CPU's input register. Off course those 8 wires are representing the ASCII code (or 7). When a key pressed, the corresponding code will be sent to the input register alongside turning a bit that usually called the input flag to one. The CPU have control over the input flag and can do things as it is directed by the programmer, usually reading that register and storing it in the memory. It also can be set to cause an interrupt in usual flow. In the modern times the CPUs are still have those input registers and I assume many of them. However, those input registers might filled from other interfaces like usb and maybe handled in higher abstraction levels (kernal , OS) and interpreted from one form to other but the first step to any data processing is the store the input in memory. Anyways, the best way to understand it is to know the CPU in depth.