I never had that happen in that exact way... but like Taz_Zoee, I've been locked out of my house.
My ex-hubby and I were standing out front of the apartment talking to the neighbor, in between our front doors, and our kitty was trying to get our attention and turned the deadbolt lock just far enough to lock the door and lock us out! Dave broke the door in so we could get into the house and then repaired the door frame!