This seems to me to be too ambiguous (or maybe too subtle) to be used in a lesson.
Gabriel no podía meter las llaves en la
cerradura anoche.
Carlos couldn't put the keys in the keyhole last night.
Without additional information, it appears that it could be either way, depending on the reader’s interpretation.