Home
Learn Hub
Technology
How does a computer mouse work?
💻 Technology

How does a computer mouse work?

Test yourself first — take the quiz below, then read the full answer.
QUIZ
How does a computer mouse work?

Pointing and Clicking

The computer mouse is one of the most familiar tools in everyday computing. You slide it across a desk, and a pointer glides across the screen in perfect step. It feels effortless and instant. But the mouse has no wheels you can see and no obvious connection to the surface. So how does this small device know exactly when you move it, and in which direction?

The Old Way: A Rolling Ball

Older mice worked in a mechanical way. Underneath was a small rubber ball that rolled as you moved the mouse. The rolling ball turned tiny wheels inside, and the computer measured those turns to figure out the movement. This worked, but it had problems. The ball picked up dust and dirt, the moving parts wore out, and the pointer often became jumpy. A better method was needed.

The Modern Way: Tracking With Light

Almost every mouse today is an optical mouse, and it works in a clever way using light instead of a ball. On the underside, the mouse has a small light source, often a tiny LED, that shines down onto the desk. Next to it is a tiny camera, a small image sensor. As you move the mouse, this camera takes pictures of the lit-up surface below, capturing thousands of images every second.

Turning Images Into Movement

The mouse then compares each new picture with the one just before it. By looking at how the tiny details of the surface have shifted from one image to the next, a small processor inside the mouse works out which way the mouse moved and how far. It turns this into movement information and sends it to the computer, which moves the pointer to match. Because there are no rolling parts, an optical mouse is more reliable, needs no special mouse pad, and tracks far more smoothly.

Source

This article was written using information from Wikipedia.