Handing in your key makes no difference to the safety of your room, as hotels will always have more than one set anyway. Nowadays many hotels have 'electronic' keys, plastic cards valid for the duration of your stay, and these you can carry about with you.