Try to view the situation as if your friend was a tenant in the house and her in-laws were her landlords. (I appreciate that the legal situation is different to that but I still think that it provides a useful analogy).
A tenant has every right to control who enters, or doesn't enter, their house. (Their landlord can insist upon entering it, to inspect the property, at 48 hours notice but that's not really relevant here). As such, a tenant is entitled to give a key to a friend or neighbour, so that they can gain access in an emergency (or simply to water the pot plants while the tenant is on holiday). The landlord has no right to restrict such an action.
So, even though your friend's in-laws might regard themselves as being akin to landlords (with your friend being a tenant who occupies the property rent-free), they still don't have the right to control entry to the house.
Therefore I don't think that you're being unreasonable by holding onto the keys. There's nothing to prevent her in-laws providing an external key box in addition to your present arrangement. Alternatively they could fit a phone entry system, so that your friend could unlock the door for visitors without the need to get to it herself.