graniteoctopus: I did, just then. Had to call my landlord who lives 45 minutes away to come down and let me. I've never been so embarrassed in my entire life. Still it's taught me to be extra vigilant with my locks.
Quite normal here apparently, as there's an official note with a phone number downstairs so that if you lock yourself out, someone (the "landlord", or the company taking care of the house/apartments) will come to open the door for you. They charge you something like 30€ or more I think, depending what time of the day it is. I guess many drunkards lose their keys every now and then, or are too intoxicated to open it by themselves.
The only case I remember locking myself out was as a kid. I came home from school and no one was home, I had forgotten keys home in the morning. Good thing it was warm spring already so I could wait outside. The problem was that I had a big number two coming, so I couldn't wait for my parents or siblings to come, but I had to go to the woods to take a dump. It's not as easy as you might think, trying not to soil your pants or shoes in the process.
As an adult, I've once locked myself out of my car though. Just as I was slamming the car door shut with the same hand where I held the keys, the keys dropped from my hand and slipped inside the car just before the door closed. It was the old kind of locking system, nowadays I wouldn't have that problem thanks to central locking.
Fortunately I had extra keys somewhere, I don't remember if I went to get them or called someone to bring them to me.
But the only really embarrasing case was years ago when my car got stuck in snow, blocking a walkway from pedestrians. I feverishly looked for a spade in the trunk to get my car out of it, and in the process I accidentally threw my car keys in a long arch to a big snowdrift.
I never saw those keys anymore no matter how hard I tried to look, so all I could do was to call my brother to go get the spare keys and bring them to me. I waited inside the car for an hour or two, many pedestrians were cursing to me while they had to pass my car in knee deep snow "Great work a-hole! You didn't find a better place to park your car, did you?" etc. I didn't feel like explaining everyone that I had lost my keys, in fact I didn't want anyone to know, in case someone not-so-nice person would find them later.