The short answer
Most cars that lock with the key fob inside are doing it on purpose. The most common reason is an auto-relock feature: if you unlock the car and don’t open a door within a short time, it locks itself again. Other causes include walk-away locking, a fob the car can’t detect inside the cabin, a second fob nearby, an accidental button press, or an electrical fault.
Smart key systems are generally designed to avoid locking a detected fob inside, but they aren’t foolproof. If the car can’t sense the fob, it may behave as if it’s not there.
Auto-relock after unlocking
Many cars relock automatically if you unlock them with the remote and then don’t open a door. The idea is to stop the car being left unlocked by an accidental press in your pocket. The delay is often somewhere around 30 seconds to a minute, though it varies by manufacturer.
This catches people out in a few ways:
- You unlock the car, put the fob on a seat through an open window or the trunk, and walk away for a moment.
- You unlock from a distance and take a while to reach the car.
- Someone unlocks it for you, and the car relocks before you open the door.
On some cars, auto-relock can be adjusted or turned off in the settings menu or by a dealer. Your owner’s manual should explain whether it can be changed.
Walk-away and proximity locking
Some cars with keyless entry lock automatically when the fob moves away from the car. If you leave the fob in the car and someone else walks away with a second fob, the car may lock as that fob leaves range, even though your fob is still inside.
Some systems also lock when the car thinks it has gone out of range, which can happen if the fob inside isn’t being detected properly.
The car can’t “see” the fob inside
Keyless systems use antennas in the cabin and trunk to find the fob. If the car can’t detect it, it may assume the fob is outside and allow the doors to lock.
A weak fob battery
A fading fob battery is a common reason for the car losing track of the fob. Other signs include having to stand closer to the car for the buttons to work, or a “key not detected” message on the dashboard. Replacing the battery is cheap and often solves it. If the buttons have stopped working altogether, our guide on how to fix an unresponsive car key walks through the steps.
Where the fob is sitting
Some spots in a car are harder for the antennas to reach. These can include the trunk, a glovebox, a metal container, a bag with a foil lining, or right next to a phone or other electronics. A fob tucked into one of these places may not be detected, even with a good battery.
Another fob nearby
If two fobs for the same car are close together, or one is in the car and one is outside, the car may respond to the one outside. A spare fob in a family member’s bag is a common way this happens.
Accidental button presses
A fob in a pocket, bag or child’s hands can be pressed without anyone noticing. If someone presses lock on a spare fob while the main one is inside, the car will usually obey. Keeping spare fobs at home, rather than carried around, reduces this risk.
Electrical faults
Less often, a fault causes random locking. A failing door switch can make the car think the doors are closed when they’re open, or a module fault can send unexpected lock signals. If your car locks itself at random times, not just when the fob is inside, see our article on why your car doors are locking by themselves, which covers these faults in more depth.
How to stop it happening
- Keep the fob on you. Get into the habit of keeping the fob in your pocket rather than putting it down inside the car.
- Open a door right after unlocking. This stops the auto-relock timer.
- Replace a weak fob battery before it fails completely.
- Keep spare fobs at home, or make sure anyone carrying one knows not to press buttons near the car.
- Check your settings. If auto-relock or walk-away locking causes repeated problems, see whether it can be adjusted.
- Carry or store a backup. A spare key kept somewhere safe, or a manufacturer app that can unlock the car remotely, can save a long wait.
If it has already happened
If you’re locked out now, check the other doors and the trunk first, then try a spare key or the manufacturer’s app if your car has one. Roadside assistance or an automotive locksmith can usually help after that. Our guide on how to unlock a car if keys are locked inside goes through the options in order.
If a child or pet is locked in the car, especially in hot or cold weather, call emergency services right away rather than waiting.