In firearms, a safety or safety catch is a mechanism used to help prevent the accidental discharge of a firearm, helping to ensure safer handling. Safeties can generally be divided into subtypes such as internal safeties (which typically do not receive input from the user) and external safeties (which typically allow the user to give input, for example, toggling a lever from “on” to “off” or something similar). Sometimes these are called “passive” and “active” safeties (or “automatic” and “manual”), respectively. Firearms with the ability to allow the user to select various fire modes may have separate switches for safety and for mode selection (e.g. Thompson submachine gun) or may have the safety integrated with the mode selector as a fire selector with positions from safe to semi-automatic to full-automatic fire (e.g. M16). Some firearms manufactured after the late 1990s include mandatory integral locking mechanisms that must be deactivated by a unique key before the gun can be fired. These integral locking mechanisms are intended as child-safety devices during unattended storage of the firearm—not as safety mechanisms while carrying. Other devices in this category are trigger locks, bore locks, and gun safes.