What happens when you move your mouse
A computer mouse tracks your hand's movement and sends that position to your computer many times per second. Inside the mouse is a sensor that watches a small area of the surface beneath it. When you move the mouse, the sensor detects the change and calculates how far and in which direction you moved. Your computer then moves the cursor on screen to match.
The mouse also has buttons wired to switches. When you press a button, the switch closes an electrical circuit, and the mouse sends a signal saying "left button pressed" or "right button pressed" to your computer. Everything happens so fast — typically 125 to 1000 times per second — that the movement feels when ready.
Key Takeaways
- Modern mice use optical or laser sensors to track movement by detecting changes in the surface pattern beneath them.
- The sensor takes thousands of tiny pictures per second and compares them to spot motion in any direction.
- Mouse buttons are straightforward switches that complete an electrical circuit when pressed, sending a signal to your computer.
- A wireless mouse sends all this data through radio waves instead of a cable, but works the same way otherwise.
How optical and laser sensors work
Most mice today use either an optical sensor or a laser sensor to track movement. Both work on the same principle: they shine light onto the surface below the mouse, capture an image of that surface, and then compare the new image to the previous one to see what moved.
An optical sensor uses a red LED light. A laser sensor uses an infrared laser. The light bounces off the surface and reflects back into a small camera inside the mouse. That camera takes a snapshot, usually between 1600 and 8000 times per second depending on the mouse model. The mouse's built-in processor compares each new snapshot to the last one, measures the difference, and calculates how many pixels the pattern shifted. It converts that pixel shift into distance — typically measured in dots per inch, or DPI.
Laser sensors are more sensitive than optical ones and work on shiny or transparent surfaces like glass, while optical sensors work best on matte surfaces like a mousepad. For everyday use on a desk, both perform equally well.
Why the surface pattern matters
The sensor needs texture or contrast to see movement. A completely blank, featureless surface — like a sheet of white paper — gives the sensor nothing to track. The mouse cannot tell if it is moving or standing still because every image looks identical.
This is why a mousepad helps. The weave of the fabric or the texture of the surface gives the sensor plenty of detail to compare between frames. Even a wooden desk or a printed document has enough texture. Glossy surfaces and mirrors are harder for optical sensors because the light reflects away instead of scattering back into the camera, though laser sensors handle them better.
How the mouse sends data to your computer
A wired mouse connects to your computer through a USB cable. Inside that cable run four wires: power, ground, and two data lines. The mouse sends its position and button status through those data lines using a protocol — a set of rules about how to format the information. Your computer reads these signals and updates the cursor position and responds to clicks.
A wireless mouse does the same thing but sends the data as radio waves instead of through a cable. It contains a small transmitter and your computer has a receiver, usually a USB dongle you plug in. The mouse and receiver are paired so they communicate on the same frequency and ignore other wireless devices nearby. Wireless mice need a battery because they have to power both the sensor and the transmitter.
What DPI means and why it matters
DPI stands for dots per inch. It describes how sensitive the mouse is: how many pixels the cursor moves on screen for each inch you move the mouse physically. A mouse set to 800 DPI will move the cursor 800 pixels for every inch your hand travels. A mouse set to 3200 DPI will move it 3200 pixels for the same movement.
Higher DPI is not always better. A high-DPI setting makes the cursor move faster and farther with less hand movement, which is useful for large monitors or fast-paced games. A low-DPI setting gives you more control for precise work like photo editing or spreadsheets. Most mice let you change the DPI through software or a button on the mouse itself. A typical starting point is 800 to 1600 DPI for general use.
The role of the mouse processor and firmware
Every mouse contains a small processor — a chip that runs instructions. This processor reads the sensor data, compares images, calculates movement, and formats the information to send to your computer. It also handles the buttons, the scroll wheel, and any special features like programmable side buttons.
The processor runs firmware, which is software stored permanently on the chip. The firmware tells the processor how to interpret sensor data, what DPI to use, and how to respond to button presses. Some gaming or productivity mice let you update the firmware through software on your computer, which can add features or improve tracking accuracy. For most everyday mice, the firmware never changes.
Scroll wheels and side buttons
A scroll wheel is a small rotating disc with ridges. Beneath it are two sensors that detect when the wheel turns. Each click of the wheel triggers a sensor, which sends a signal to the processor. The processor then tells your computer "scroll up" or "scroll down" depending on which direction the wheel turned.
Side buttons work the same way as the main left and right buttons: they are switches that close a circuit when pressed. The processor detects the switch closing and sends a signal to your computer identifying which button was pressed. Many mice let you reprogram side buttons through software to do custom actions like opening a web browser or switching between programs.
Frequently Asked Questions
Why does my mouse stop working on a glass desk?
An optical sensor cannot see movement on glass because light passes through it instead of reflecting back into the camera. A laser sensor works better on glass, but even then, a mousepad or a textured surface underneath gives more reliable tracking. If you must use glass, a laser mouse or a reflective mousepad designed for glass will help.
What is the difference between a trackpad and a mouse?
A trackpad uses a capacitive sensor that detects your finger's electrical properties as you move it across the surface. A mouse uses an optical or laser sensor that photographs the surface beneath it. Trackpads are built into laptops for convenience; mice are separate devices that many people find faster and more precise for extended use.
Can I use a mouse on any surface?
Most optical mice work on any matte or textured surface — wood, paper, fabric, plastic. Laser mice work on more surfaces including some glossy ones. Completely smooth, featureless, or transparent surfaces like clean glass or a mirror will not work with either type. A mousepad solves this by providing texture the sensor can track.
Do wireless mice have lag or delay?
Modern wireless mice have minimal lag — usually less than 1 millisecond, which is imperceptible. The radio connection is fast enough that you will not notice a difference from a wired mouse during normal use. Gaming mice are engineered for even lower latency, though the difference matters only in competitive games where milliseconds count.
Why do some mice have higher DPI than others?
Higher DPI requires a more sensitive sensor and faster processor to handle more data per second. Gaming and productivity mice often have higher DPI options because users want to customize sensitivity for different tasks. A basic office mouse may max out at 1600 DPI because that is sufficient for typical work, and higher DPI would add cost without benefit.