You can take a lot of measures to avoid losing your keys, as given below;
Find a key ring that has an address hanger with it. Write your apartment or office address on it, so the one who gets your keys can send you keys to the mentioned address.
Take very good care of your keys. Do check your keys whenever you are leaving a place where you visit.
Give a duplicate key to your friend or neighbor.
You can place another key somewhere in a hidden place near your apartment.