In her memoir, Helen Keller depicts herself as an energetic and mischief-making young girl. One day she finds a key. She uses it to lock her mother in a pantry. She describes her "glee" as she sits on the porch steps and feels the "jar" of her mother pounding on the door, trying to alert someone to let her out. The servants are in the "detached" part of the house, so they don't hear her. Helen simply laughs. Her mother is locked up for three hours. This incident helps convince her parents they must do something about Helen.
Later, after Miss Sullivan arrives, Helen's mother hands Helen a key to give to Miss Sullivan. Instead, Helen locks Miss Sullivan in her room and hides the key under a wardrobe. She won't tell anyone where the key is, so her father has to get a ladder to help Miss Sullivan out the window. This is also a "delight" to Helen.
One can imagine that Helen often feels helpless and out of control, so these rare moments when she can be in charge thrill her—even if they badly inconvenience others.