What happens physically when the user interacts with the computer, when a button is pressed on the keyboard for example?

350 views

The question is the basics of how a computer works, most people seem to think it is magic or something, I would like to understand.

Is it an electric charge that goes on a chip? how does that translate into a screen?

In: 2

10 Answers

Anonymous 0 Comments

Each button is an electric switch. When you press it, it sends an electrical signal. This signal might or might not get processed or modified by the circuitry in the mouse/keyboard.

That signal travels through the wire connecting your mouse or keyboard to your computer.

Whatever plug your mouse or keyboard is plugged into (say, a USB) receives that signal.

Your operating system frequently checks each of the inputs that it’s aware of to check for a signal. It notices that a signal is present and checks which signal is present.

Your operating system checks for programs that are listening for input. (Mechanically, those programs have a loop in them that says “every frame, if the user has pressed the left mouse button then…”). It then sends the input to those programs.

The programs decide what to do with the input. If it’s a word processor, for example, pressing “w” instructs it to add a “w” to the end of the data in your current document. If it’s a video game, pressing “w” might cause it to increase the vertical speed of your character. And so on.

You are viewing 1 out of 10 answers, click here to view all answers.