In Greek it's
«κλειδί» [kliˈði] (neut.), the Byzantine Greek neuter diminutive
«κλειδί(ο)ν» /kliˈði.(o)n/ of the Ancient Greek 3rd declension feminine noun
«κλείς» /kleːs/ (nom. sing.),
«κλειδός» /kleː.ˈdos/ (gen. sing.) -->
bar, bolt, hook, key, collar bone (PIE *kleh₂u-
to lock an inherited IE word found in many languages: Lat. clāvis /ˈklaː.u̯is/ > It. chiave /ˈkja.ve/, Sp. llave /ˈʎa.βe/, Fr. clé-clef /kle/-/klef/, Rom. cheie /ˈke.je/; Proto-Slavic *ključь > Rus. ключ /klʲʉt͡ɕ/, BCMS кључ-ključ /kʎuːt͡ʃ/, Cz. klíč /kliːt͡ʃ/, Pol. klucz /klut͡ʂ/ etc.).
In English there seems to be no connection between the word key and a verb of closing or opening.
How is this in your language?
The denominative Ancient verb
«κλείω» /ˈkleː.ɔː/ > MoGr
«κλείνω» [ˈkli.no̞] derives from it -->
to shut, block (AncGr), shut, close, block, turn off (MoGr).
The denominative Ancient verb
«κλειδόω» /kleːˈdo.ɔː/ (uncontracted),
«κλειδῶ» /kleːˈdɔ̂ː/ (contracted) > MoGr
«κλειδώνω» [kliˈðo̞.no̞] also derives from it -->
to lock up.
The verb for
open is unrelated to the word for
key: Ancient Greek
«ἀνοίγνυμι» /ɐˈnø.gnymi/ a compound formed with the joining of the preposition
«ἀνά» /ɐˈnɐ/ -->
up along (PIE *h₂en-
up, on high c.f. Avestan ana /aˈna/ (upwards, along), Proto-Germanic *ana > Eng. on, Dt. aan /aːn/, Ger. an /ʔan/ etc.) + athematic verb
«οἴγνυμι» /ˈø.gnymi/ -->
to open (PIE *h₃ueig-
to give way c.f. Skt. वेग /ˈʋeː.ɡɐ/ (rapidity, speed), Avestan vaēɣa- (violent movement)). In Modern Greek the ancient verb has been simplified to
«ανοίγω» [aˈni.ɣo̞] -->
to open, unblock, turn on.
Edit: Added «κλειδῶ»