I wanna post some ideas of mine here on "the key"!
When we use "the key to the room", it is surely the key used to open the door of the room. (room-key). :up: Precisely
Whenever we use "the key" only (without any modification), it can be any kind of key such as car key, room key, fridge key... no matter which article among "from" and "in" we use. ...it can be any kind of key already defined (through the use of the definite article the) such as car key, room key, fridge key
After reading your post, I may understand the difference. I would suggest the following context:
A: Do you have the key to the room on you?
B: No, I've lost it in my room. (means that it's still somewhere in my room but I've not found it). :up: Precisely
Or No, I've lost it from my room.(means that I laid it in my room but for somehow It's not in my room now and I've scanned all my room to find it but it's really out of my room, maybe someone has taken it away). Yes, that'd be a fine explanation, but you'd normally just say No, I've lost it.
I think in "the key to my room", "to my room" modifies the key. But in "... lost the key from/in my room", the "from/in my room" modifies the verb "lost" not the object "the key". Maybe that's one of the differences. That could be true.
That's my own ideas. Please give me your comments!
Thank you so much!