Another choice of translation of the sentence "lock the door" is:
Ok. "Закрой дверь!" - "Close the door!". And "Lock the door!" - "Запри дверь!" or also "Закрой дверь на ключ!" But not vice versa. Instead of "на ключ" can be used others kinds of locks.
If you didn't specify "на ключ", would "Закрой дверь" just mean close the door (but not necessarily lock it)?
Yes, it can mean both. You can safely rely on context. If you ask your relative to not forget to "close" the door when they leave the house, you can be sure they understand they should lock it. Also, if you are too lazy to lock the door when there are still people at home, «закрывайтесь!» is enough to let them know you have left the house and they should lock he door now.
There is another verb, «запереть» (imperfective: «запирать»). If you command «Запри дверь!» it unambiguously means you want it locked. However, good old «закрыть» is a lot more popular a verb.
Could one say?: закрой дверь ключом!
I think you can say so in colloquial speech, an interlocutor will understand you, but I have not heard such a phrase, everyone says "на ключ".
I imagine a person shutting the door softly with a wrench ("гаечный ключ") in his outstretched arm. :)
In my experience "закрой дверь ключом" is used when speaking about a car to distinguish between locking it with a mechanical key or with a remote control.
Igor is right, it's interchangeable by context and Закрой is much more popular than Запри. But sometimes using закрой and not замкни leads to misunderstandings. For example we argued a lot with my girlfriend about it, when I asked her: "Ты закрыла дверь?", when I thought it is clear by context that it is about locking the door and not simply closing. She often responds yes and I find it unlocked afterwards. Argue incoming. That is weird, but considering unclear context and subjective perception it's better to use закрой when you mean just closing and замкни when you mean locking. it's much clearer.
I don't think we use замкнуть in the meaning "to lock" nowadays. People will probably understand you after a second or two but запереть is way more popular. Замкнуть, I think, survived in dialects and in speech of very old people: I found a few examples written in the second half of the 20th century in the corpus.
This is exacy like we say in Spanish : "Cierra la puerta con llave".
Zakroi dver’ na klyuch -> reported as wrong. Is it having problems with answers in English letters now?
I think it means the equivilent of deadbolt or also pin if referring to electronics
I was thinking that imperative forms always end with и or ите. Do we have here an exception or there there is a rule why закрой ends whith й?
They end in -й / -йте if the imperative stem (the они form without the ending) ends in a vowel. If the imperative stem ends in a consonant, the endings are -и / -ите or -ь / -ьте. The former for stems ending in more than one consonant or if the я form of the verb is stressed on the ending. Otherwise, the later.
That's the problem with other poorly designed vocab apps. Not only did it give wrong info, but when it would give translations it would always use "the". Мяч = the ball, instead of ball. Really annoying.