A lanyard is a rope or a cord that is often worn around the neck or wrist to carry something. Aboard a ship, it may refer to a piece of rigging used to secure objects, or to a cord with a hook at the end which is used to fire a cannon. Dragoons would use lanyards (usually called sword knots) to secure their sabres to their wrists, and thus allow the firing of carbine and pistol with the sabre out (hence the French term of dragonne).
Pistol lanyards are designed to connect a pistol grip to a uniform on a semipermanent basis. A well made pistol lanyard can be easily removed and reattached by the user, but otherwise will stay connected to the pistol whether it is drawn or in a holster. A good pistol lanyard can be invaluable in an emergency, because it prevents the ball from being dropped. In addition, some pistol lanyards use an elasticized plastic coil design that may slightly cushion the pistols recoil.
Lanyards of various colour combinations and braid pattterns are also commonly worn on the shoulders of British and Commonwealth military uniforms to denote the wearer's qualification or regimental affiliation. Lanyards have started to appear on many consumer electronics devices. With increasing miniaturisation, many digital cameras and MP3 players include lanyards, providing easy portablity, and ensuring it can be secured to the wrist or tied down.