In this post, we will study a safety feature that is present in some semi-automatic pistols that are Double Action. Recall in our discussion about revolvers that double action firearms are generally able to operate in double action as well as single action mode (unless they are labelled DAO - Double Action Only, in which case they only operate in double action mode). In pistols of this sort, the user may manually pull back the hammer to cock it and then pull the trigger to release it (single action mode), or simply pull the trigger back, which cocks the hammer and then releases it (double action mode).
When fired in double action mode, the trigger pull is harder and longer since the trigger action needs to cock the hammer before releasing it.
In many cases, people like to carry their pistols with one round chambered, but the hammer decocked and any other safety devices may be turned on or off. The pistol is "considered safe" because it takes a longer and stronger trigger pull to cock and release the hammer, than if the hammer was cocked already and the trigger merely releases it.
So when a user wants to carry a pistol in this state, they initially insert a loaded magazine normally and then pull back on the pistol's slide to load the first round in the chamber. However, this same action also cocks the hammer. So, now the user wants to decock the hammer without firing the pistol. In olden days, the trick was to hold the hammer's spur down with the thumb and then pull on the trigger and then slowly let down the hammer so that it falls back to the "safe" position without discharging the loaded cartridge. Of course, this approach has some danger in that if the user's thumb slips off the hammer's spur, it could cause the hammer to strike the cartridge with force and discharge it. In order to reduce this danger, a decocking lever was introduced.
With a decocking lever, the mechanism either blocks the hammer from slamming on the firing mechanism, or by covering or retracting the firing pin out of the way, so that the hammer can be safely released without triggering the firearm. Of course, all mechanisms can fail, so it is still a good idea to point the firearm in a safe direction before operating the decocker lever.
Decocking mechanisms are found on pistols from many manufacturers: Heckler & Koch, the Sig Sauer pistol family, Walther pistols etc.