"The Toyotas with this system won't let you lock the key inside. If you try, they emit a long, distinctive beep and won't lock the door."
Most of the newer cars are like this, I think.
HOWEVER... that can only be depended upon IF THE KEY IS IN THE IGNITION. Drop it on the floor, set it down on the seat, etc, and the car will think you have it in your hand and lock the door.
That's why I always carry a $1 door key (unchipped).
Sue