Optical vs Mechanical Keyboards: What's the Difference?
Consisting of keys that act as electrical switches, keyboards play an important role in the function of computers and other devices. When connected to a computer or device, a keyboard serves as a peripheral for input. You can perform commands on the computer by pressing the keys. While all keyboards serve this same basic function, though, there are many different types available, including mechanical and optical. So, what's the difference between a mechanical keyboard and an optical keyboard?

What Is a Mechanical Keyboard?
Mechanical keyboards are characterized by the use of individual moving parts for their electric switches. Each key features an electrical switch - and these switches are comprised of individual moving parts. In a typical mechanical keyboard, each switch consists of a housing unit, a stem and a spring. When you press a key, the electrical contact underneath the key will push into a separate electrical contact below it, thereby completing the circuit. Releasing the key, on the other hand, causes it to spring back up, thereby breaking the circuit.
Although they are somewhat complex, mechanical switches have a long lifespan. They typically last longer than both membrane and dome-switch keyboards. Some mechanical keyboards, in fact, last for over 40 million clicks. Mechanical switches are also easy to repair. If a component breaks, you can replace it.

