From Middle English keye, kaye, keiȝe, from Old English cǣġ, cǣġe, cǣga (whence also Scots key and kay), of uncertain origin. Related to Old English cǣggian ("to lock, shut"). The only sure cognates are Saterland Frisian Koai, West Frisian kaai ("key"), and North Frisian kay ("key"). Possibly from Proto-Germanic *kēgaz, *kēguz, from Proto-Indo-European *ǵogʰ-, *ǵegʰ-, *ǵegʰn-, 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. 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."
Variant of cay, from Spanish cayo, from Taíno cayo