also latchkey, "a key to raise or draw back the latch of a door" and allow one to enter from outside, 1825, from latch (n.) + key (n.1). Latchkey child first recorded 1944, American English, in reference to children coming home from school while both parents are away at work.
Many elementary school principals and teachers have always known the "latchkey" child or the "eight-hour orphan." [New York State Teachers Association, "New York State Education," 1944]
The older or simpler device was a latch-string, which could be pulled in to lock up; having it out was symbolic of openness.