I fix everything, I'm just a handyman ....
The first mechanical locks were made of wood, and were evidently created at the same time by several cultures. There is evidence that they were in use about 4,000 years ago in Egypt. Attached vertically to a post, the wooden lock contained a pin mechanism. The pins were drawn downward by gravity (like a Humpty Dumpty doll) and locked the door. This action was performed by a wooden key with bumps or teeth that pushed the pin up from the bolt and allowed it to be pulled back. The locking method marks the beginning of modern cylinder locks.The first metal locks appeared between 870-900, and are attributed to expert English craftsmen. They were simple iron bolt locks, with grooves around the hole of the key, which prevented attempts to enter.The Romans were the first to use a grooved lock. They designed a barrier mechanism that stops a key that does not fit the lock from being inserted or rotated.