There are several ways to keep your gun safe and prevent anyone from using it, while it is stored safely away. There are cable locks which use a cable that runs through the chamber of the pistol to assure that if someone grabs the gun, you will need a key. Another way is a chamber lock; the chamber lock is designed to block ammunition from being chambered. Finally, there is the trigger lock, which prevents motion of the trigger. Some trigger locks encase the whole trigger, making it completely inaccessible. While other trigger locks only prevent the trigger from moving by placing a metal rod between the trigger and the trigger guard. All these types of locks have locks in them, and can only be unlocked by a key. These locks are designed to work with the pistol being unloaded.
There is much controversy concerning the trigger locks. Many people have stated if a criminal was invading your house, it would take you way too long to unlock the trigger and load the gun, which makes it useless. Other people would rather keep their gun stored in a safe, unloaded or loaded, without a trigger lock on it. This would make it a lot quicker to access a gun to stop the invader. Many people keep most of their guns locked up in there safe, and have a self-defense weapon hidden in their dresser or nightstand, without a trigger lock. This makes the person living in the house have a sense of protection and can still access their gun in a timely manner, if something was to happen. I recommend any family who has smaller children or young teenagers to lock up your weapons, in a safe or a trigger lock. If you live in a high crime area or need a sense of protection, then I would keep a gun in my dresser or nightstand, hidden, just in case something were to happen. I also recommend that you educate your children about gun safety and if anything were to happen, such as a robbery, the children would know what to do. Source for Gun Safety Locks