Ball detent

A ball detent is a simple mechanical arrangement used to hold a moving part in a temporarily fixed position relative to another part. Usually the moving parts slide with respect to each other, or one part rotates within the other.
The ball is a single, usually metal sphere, sliding within a bored cylinder, against the pressure of a spring, which pushes the ball against the other part of the mechanism, which carries the detent - which can be as simple as a hole of smaller diameter than the ball. When the hole is in line with the cylinder, the ball falls partially into the hole under spring pressure, holding the parts at that position. Additional force applied to the moving parts will push the ball back into its cylinder, compressing the spring, and allowing the parts to move to another position.
Ball detents are commonly found in the selector mechanism of a gearbox, holding the selector rods in the correct position to engage the desired gear. Other applications include clutches that slip at a preset torque, and calibrated ball detent mechanisms are typically found in a torque wrench.
Ball detents are one of the mechanisms often used in folding knives to prevent unwanted opening of the blade when carrying it.
Use in Paintball Markers.
The term "ball detent" is also used when referring to a mechanism in paintball markers designed to prevent the paintball from rolling out of the firing chamber before being fired. Some designs are similar to those outlined above, with a cartridge utilizing a ball bearing in a bore with spring pressure. The cartridge is installed perpendicular to the barrel bore axis, just ahead of where the ball rests before being fired. Other designs use elastic rubber protrusions that block the ball until it is pushed over it by the bolt. Some designs use precisely calibrated rings or "barrel sizers" that are selected to have a slightly smaller inner diameter than the outer diameter of the paintballs being used. They rely on simple constriction of the bore to prevent paintballs from rolling through them from the force of gravity. When the marker is fired, the air pressure pushes the ball through the bore, causing it to compress enough to pass through. Paintballs have varying diameters depending on a number of factors; this type of ball detent must be sized correctly to avoid compressing the paintball too much, causing it to burst. If too large of a sizer is selected, balls may roll through it.
The cartridge and elastic rubber protrusion type detents are primarily used for open bolt markers, or on closed bolt markers to prevent double feeding (feeding more than one ball when the bolt is open for loading). Closed bolt markers generally use the constriction method to prevent "roll outs", a malfunction where the ball completely rolls out of the barrel, causing no paintball to be fired when the trigger is pulled. A partial roll out is when the ball rolls partially through the barrel, causing reduced velocity.