A lightgun is a device, usually modeled on a ballistic weapon such as a pistol, that is used for targeting objects on a video screen by pointing the end of the device in the right direction. Lightguns also usually have a pushbutton (analog or digital) in the shape of a trigger. Additional buttons may also exist. With force feedback, the light gun can also simulate the recoil of the weapon (see tactile output).
The "light gun" is named because it uses light as its method of detecting where on screen the user is targeting. The name leads one to believe that the gun itself emits a beam of light, but in fact most light guns actually receive light through a photodiode in the gun barrel. There are two versions of this technique that are commonly used, but the concept is the same: when the trigger of the gun is pulled, the screen is blanked out to black, and the diode begins reception. All or part of the screen is painted white in a way that allows the computer to judge where the gun is pointing, based on when the diode detects light. The user of the light gun notices little or nothing, because the period in which the screen is blank is usually only a fraction of a second.