 Most commonly the emitters and sensors are located at the perimeter, mounted on a small PCB.The light is directed from side to side of the keyboard interior, and it can only be blocked by the actuated keys.Most optical keyboards require at least 2 beams (most commonly a vertical beam and a horizontal beam) to determine the actuated key.