This article is about the computer input device. For the pen-sized flashlight, see penlight.
Photo of the Hypertext Editing System (HES) console in use at Brown University, circa October 1969. The photo shows HES on an IBM 2250 Mod 4 display station, including lightpen and programmed function keyboard, channel coupled to Brown's IBM 360 mainframe.
It allows the user to point to displayed objects or draw on the screen in a similar way to a touchscreen but with greater positional accuracy. A light pen can work with any CRT-based display and other display technologies, but its ability to be used with LCDs was unclear (though Toshiba and Hitachi displayed a similar idea at the "Display 2006" show in Japan).
A light pen detects a change of brightness of nearby screen pixels when scanned by cathode ray tube electron beam and communicates the timing of this event to the computer. Since a CRT scans the entire screen one pixel at a time, the computer can keep track of the expected time of scanning various locations on screen by the beam and infer the pen's position from the latest timestamp.