What happens when you move your mouse
A computer mouse works by detecting the direction and speed you move it across a surface, then sending that information to your computer 60 to 125 times per second. Inside the mouse is a small camera or light sensor that watches a tiny patch of the surface beneath it. As you slide the mouse, the sensor sees the surface pattern change and calculates how far the mouse has moved. Your computer receives these measurements and moves the cursor on screen to match.
The sensor does not care what surface you use — a desk, a mousepad, or even a piece of paper. It straightforward compares what it sees now to what it saw a fraction of a second ago, the same way your eye can tell you are moving even in a dark room by noticing how the scenery shifts. This happens so fast that the cursor follows your hand almost when ready, with only a tiny delay you would not notice.
Key Takeaways
- Modern mice use an optical or laser sensor to photograph the surface beneath them and detect movement by comparing images taken dozens of times per second.
- The sensor sends X and Y coordinates to your computer, which translates those numbers into cursor position on your screen.
- Clicking the mouse button sends a separate signal to your computer that tells it which button was pressed and whether it was a single click, double click, or held down.
- Wireless mice use radio signals to send movement and click data to a receiver plugged into your computer, while wired mice send the same data through the cable.
- The dots per inch (DPI) setting controls how far the cursor moves for a given physical movement of the mouse.
How the optical sensor sees movement
The sensor inside your mouse is called a CMOS image sensor — the same type of chip found in smartphone cameras, but much smaller and simpler. It sits behind a small lens at the bottom of the mouse and takes a photograph of the surface below roughly 6,000 times per second on most gaming mice, or 1,000 to 2,000 times per second on standard office mice.
Each photograph is only a tiny square — usually about 16 by 16 pixels — because the sensor only needs to see a small patch of the surface to detect motion. The mouse compares each new photograph to the one taken just before it. If the pattern has shifted 3 pixels to the right, the mouse knows it moved right. If the pattern shifted down and to the left, the mouse calculates that movement too. The mouse then sends these measurements to your computer as X and Y coordinates — horizontal and vertical position.
This is why a mousepad with a pattern works better than a blank surface: the sensor needs texture to see movement. A completely smooth, featureless surface gives the sensor nothing to compare between frames, so the mouse cannot tell if it has moved. Most modern mousepads and desks have enough texture that this is not a problem, but a mirror or sheet of glass would confuse the sensor.
The difference between optical and laser mice
Most mice today use an optical sensor, which shines a red LED light onto the surface and photographs the reflection. The light bounces off the texture of the surface and back into the sensor, creating the image the mouse uses to detect movement. Optical mice work on almost any surface and are reliable and inexpensive to manufacture.
Laser mice use a laser instead of an LED, which penetrates slightly into the surface rather than just bouncing off the top. This allows laser mice to detect movement on some glossy or reflective surfaces where optical mice struggle. Laser mice are more expensive and are usually found in gaming mice or high-end office mice. For everyday use, the difference is small — both types work equally well on a normal desk or mousepad.
How clicking sends a signal to your computer
The mouse buttons sit on top of a switch — a small mechanical or electronic component that closes a circuit when you press it. When you click the left button, the switch closes and sends a signal to your computer that says "left button pressed." When you release the button, the switch opens and sends a signal that says "left button released." Your computer counts how quickly the presses and releases happen to figure out if you did a single click, a double click, or a click-and-hold.
Most mice have at least two buttons (left and right), and many have a scroll wheel in the middle that also acts as a button. Some gaming mice have extra buttons on the side that you can program to do different things — open a menu, switch weapons in a game, or launch an process. Each button has its own switch, so your computer knows exactly which button you pressed.
The scroll wheel works differently: it has a small encoder wheel inside that spins as you roll the wheel. The encoder counts the clicks as you scroll and sends that count to your computer. Your computer then scrolls the page up or down by a number of lines that matches how many clicks you made.
How wireless mice send data without a cable
A wireless mouse contains a small radio transmitter that sends movement and click data to a receiver — a small device that plugs into your computer's USB port. The mouse and receiver are paired at the factory, meaning they are set to communicate on the same radio frequency so they do not interfere with other wireless devices in your home.
The mouse sends the same information a wired mouse would send through a cable: X and Y coordinates and button press signals. It does this dozens of times per second, just like a wired mouse. The receiver picks up these radio signals and passes them to your computer through the USB cable, and your computer responds exactly as it would if the data came from a wired mouse. The delay is so small — usually a few milliseconds — that you cannot feel a difference between a wireless and wired mouse during normal use.
Wireless mice need batteries because the radio transmitter uses power. Most wireless mice run on one or two AA or AAA batteries and last several months on a single set, depending on how much you use the mouse. Some rechargeable wireless mice have a built-in battery that you charge through a USB cable, similar to charging a phone.
What DPI means and why it matters
DPI stands for dots per inch, and it controls how far the cursor moves on your screen for each inch you physically move the mouse. A mouse set to 800 DPI will move the cursor a certain distance for a given hand movement. The same mouse set to 1600 DPI will move the cursor twice as far for the same hand movement.
Higher DPI is useful if you have a large monitor or multiple monitors, because you can move the cursor across the whole screen without moving your hand as far. Lower DPI gives you more precise control, which is why gamers often use 400 to 800 DPI when playing games that require accurate aiming. Most office mice default to 800 to 1200 DPI, which works well for typical desk work.
You can change the DPI in your computer's mouse settings, or on gaming mice you can often change it by pressing a button on the mouse itself. The sensor inside the mouse does not change — it still takes the same photographs and measures movement the same way. The DPI setting just tells your computer to multiply or divide those measurements before moving the cursor.
Common problems and why they happen
If your cursor jumps around or moves erratically, the most common cause is a dirty sensor. Dust, hair, or dried liquid on the bottom of the mouse blocks the light from the LED or laser, so the sensor cannot see the surface clearly. Flip the mouse over and wipe the bottom with a dry cloth or a slightly damp cotton swab. If the problem persists, clean the surface you are using the mouse on — a dusty desk can also confuse the sensor.
If your wireless mouse stops responding, the batteries are usually the first thing to check. Replace them with fresh ones and see if the mouse works again. If it does not, try moving the mouse closer to the receiver, because thick walls or metal objects can block the radio signal. If the receiver is plugged into a USB port on the back of your computer tower, try moving it to a port on the front or side, which may have a clearer line of sight to the mouse.
If the cursor moves too slowly or too fast, check your DPI setting in your computer's mouse settings. You can also try adjusting the pointer speed slider, which is separate from DPI and controls how your computer interprets the mouse's movement data. Some mice also have a button to cycle through preset DPI levels — check your mouse manual to see if yours does.
Frequently Asked Questions
Why does my mouse not work on a glass table?
Glass is too smooth and reflective for most optical sensors to see texture. The light bounces straight through or reflects away instead of scattering back into the sensor, so the mouse cannot compare images to detect movement. A mousepad or even a piece of paper under the mouse solves this problem. Laser mice work better on glass than optical mice, but even they struggle with perfectly smooth surfaces.
Can I use a wireless mouse without the receiver?
No. The receiver is the only way for the wireless mouse to communicate with your computer. If you lose the receiver, you can sometimes buy a replacement from the mouse manufacturer, but it must be paired with your specific mouse. A wireless mouse cannot connect to your computer through Bluetooth unless it was specifically designed to do so — most wireless mice use their own proprietary radio frequency.
What is the difference between a gaming mouse and a regular mouse?
Gaming mice typically have higher maximum DPI (up to 16,000 or more), take more photographs per second (up to 8,000 or higher), and have extra programmable buttons. They are also usually heavier and have a different shape designed for a specific grip style. For everyday work, these features do not matter — a standard mouse is faster and cheaper. Gaming mice are built for the precision and speed needed in competitive games.
Do I need to clean my mouse regularly?
Only if you notice the cursor jumping or moving erratically. Most mice do not need regular cleaning if you use them on a clean desk or mousepad. If you eat at your desk or work in a dusty environment, cleaning the sensor every few months prevents buildup. A quick wipe with a dry cloth takes less than a minute and keeps the mouse working smoothly.
Why does my mouse cursor lag behind my hand movement?
A tiny delay is normal and unavoidable — it takes time for the mouse to measure movement, send the data to your computer, and for your computer to update the screen. This delay is usually only a few milliseconds and you will not notice it. If the lag is obvious, check that your mouse is not set to a very low DPI, which can make movement feel sluggish. You can also try updating your mouse driver or moving the wireless receiver closer to the mouse.