Future MacBook keyboards might not have mechanical keyboard switches, with a patent suggesting an “optical keyboard.”
The optical keyboard would use a system of emitters and sensors that measure light. If the key sensors detect a change in the light, it could take that as input.
The light sensor may detect changes in an amount of received light caused by actuation of a keycap of the button or key. The button or key may include an opaque structure that blocks a portion of the light when the key is compressed. The button or key may include a light source such as a light-emitting diode that generates light.
A portion of the light from the light source may illuminate the key or button to provide backlight for the key and another portion may be received by the light sensor for detecting partial or complete compression of the button or key.