According to the fair rental practices the landlord shall maintain the safety of the apartment in regards to the keys and locks of the apartment.
When renting an apartment, the landlord shall give a reasonable amount of keys to the tenant. A good amount of keys could be one per tenant and one spare key. It would be consistent with the fair rental practices to give the tenant the opportunity to have a reasonable amount of extra keys made. The landlord has the right to have a key to the apartment also.
When moving out, the tenant shall return all the keys to the apartment, including those they have had made themselves. It would be wise to make a written receipt of the return, with both the tenant’s and landlord’s signature and the amount of keys.
The keys should be handled with care. One should not attach any addresses, names or other details of the tenant/apartment. If the keys are lost, it might lead to renewing the locks, which the tenant has to pay for, if the keys are lost due to their carelessness.