A German 18th century jailer's key gun with lock. Key pistols were used by jailers for self-defense and for sounding an alarm. The idea being that the jailer could use the same object to open the cell door and also defend himself in the event that prisoners tried to escape or attack