According to PC Magazine Encyclopedia, a mechanical mouse uses friction between a roller ball and a mouse pad to determine hand motion and translate it into pointer movement on a computer. A mechanical mouse is called a roller ball mouse.
Inside a mechanical mouse, the roller ball rubs against two wheels. One wheel determines vertical movement, and the other determines horizontal movement. Each wheel spins a shaft that connects to a small disk with holes around the edge. A beam of LED light shines on each disk, and as the disk spins, it interrupts the light beam. Computer chips interpret data from the light beam to determine pointer direction and speed.