WonderHowTo has a gallery of jailer key guns, which came in handy in the days of yore.
Most correctional officers today do not carry firearms, unless they're isolated away from the prison population. But back in the olden days, prison guards on their rounds needed a little backup power in their hands, especially when opening cell doors—usually a two-handed job.
So came the birth of jailer key guns, a cell door key that doubles as a primitive one-shooter. Filled with gunpowder, "turnkeys" could fire the miniature key-pistol in case there was any trouble with the prisoner when opening the door.