Optical mechanical keyboard switches are a type of key switch that retains the feel of mechanical switches with optical technology. In a traditional mechanical switch, a key press is registered when two metal contacts make physical contact. In contrast, optical-mechanical switches utilize a beam of light and a sensor. When a key is pressed, it interrupts the light beam. The sensor then detects the interruption, which registers the keystroke.