From Middle English keye, kaye, keiȝe, from Old English cǣġ, cǣġe, cǣga (“key, solution, experiment”) (whence also Scots key and kay (“key”)), of uncertain origin. Related to Old English cǣggian (“to lock, shut”). The only sure cognates are Saterland Frisian Koai (“key”), West Frisian kaai (“key”), and North Frisian kay (“key”). Possibly from Proto-Germanic *kēgaz, *kēguz (“stake, post, pole”), from Proto-Indo-European *ǵogʰ-, *ǵegʰ-, *ǵegʰn- (“branch, stake, bush”), which would make it cognate with Middle Low German kāk (“whipping post, pillory”), and perhaps to Middle Dutch keige (“javelin, spear”) and Middle Low German keie, keige (“spear”). For the semantic development, note that medieval keys were simply long poles (ending in a hook) with which a crossbar obstructing a door from the inside could be removed from the outside, by lifting it through a hole in the door. Liberman has noted, however, "The original meaning of *kaig-jo- was presumably '*pin with a twisted end.' Words with the root *kai- followed by a consonant meaning 'crooked, bent; twisted' are common only in the North Germanic languages."