a. I have a key to open the main gate in my room.
b. I have a toy to keep the dog amused in my pocket.
Are the above sentences grammatically correct?
Obviously the main gate is not in my room and the dog is not in my pocket. I think the sentences work, although some might argue that the place adverbial is misplaced.
Many thanks