Depending on the brand, they are operated either by combination or key. Some versions also include motion sensors or high-decibel alarms.
Manufacturers recommend they be used only on unloaded guns.
Cable locks, like a bicycle lock, thread through a gun's barrel or trigger. Most manufacturers, such as Master Lock, recommend use only on unloaded guns. Beretta USA Corp. ships its guns with cable locks. On semiautomatic pistols, it attaches to the ammunition magazine. Some police departments, including Boston, have bought for off-duty officers.