The first type uses a push in button in the knob to lock the door from the inside. Generally speaking there are two types of locks that are used for bedroom doors or interior doors.
Use A Broken Metal Fork As A Quick Door Lock Home Safety Household Hacks Home Security Systems
If the locking mechanism is a latchbolt the kind of bolt that is spring loaded and has one angled edge and the angled edge is facing away from you you can hook it with a wire hanger.

How to open a locked bedroom door. When you insert the screwdriver in the hole where the lock is jiggle the screwdriver around until you hear the lock unlocking. Open up the bobby pin so it bends at a 90 angle and shave off the rubber tip on the straight end with a knife or razor. First you ll need to determine what type of lock is installed on the bedroom door.
Insert that end into the keyhole then bend the pin so it s flush against the outside of the lock. To unlock the door simply insert the key or other tool into the pinhole in the doorknob and push it straight in until you contact the release button. The second type of lock uses a twist button that is turned right or left to work.
Rotate the key until it fits into the slot in the button then turn the key just like turning a screw. If you usually carry around paperclips in your school backpack or your work bag then you re fully covered. Paperclips are a great tool when you need to unlock your bedroom door lock.
Make a hook at the end of a second pin to create a tension lever. So your bedroom door or bathroom door is locked you ca.