Early firearms required many different tools to operate. These tools did not have to remain purely practical but could be decorated and embellished. A spanner was integral to a wheel lock gun. The wheel lock works by spinning a spring-loaded steel wheel against a piece of pyrite to generate intense sparks, which ignite gunpowder in a pan, which flashes through a small touchhole to ignite the main charge in the firearm's barrel. The spanner was needed to turn the wheel and spring, readying the gun to be fired.
Details