Above are two examples of jailer's key guns. They're muzzle loading pistols that allowed jailors to have a drawn gun while they were unlocking cells. There are four more example at oobject.com's post jailers key guns: 16th Century Key Gun. From there, each image has a link that describes the gun in a little more detail.
I couldn't find out much about them. I'm not sure if jailers really used them, or if they are just some sort off oddball novelty from back in the day. I did find one from the mid 18th century that sold at an auction for $402, so there was such a thing, whatever its use.
There is a place called Dixie Gun Works that sells replicas of them for $37.50. They're also uncertain about them. Their brief description reads, "These are reproductions of old jailers' keys that might have been used hundreds of years ago. Supposedly, they were used as the jailer walked his rounds."
There might be more information about them in a book about antiques. It would be interesting to know more about them.