Recently, I forgot whether 鍵【かぎ】 meant lock or key, so I looked it up quickly on my phone's dictionary... And then I found out that it actually means both.
What are the best ways to figure out if someone who is saying 鍵【かぎ】 is talking about a lock or talking about a key? Is the intonation maybe different for each meaning? Is there a way to ask which they are talking about? Is there a common alternative word for one or both of them?
Definitely not as important as the main question, but I'm also wondering if Japanese people sometimes get confused by this or if they just process it naturally since they're used to 鍵【かぎ】?