I've read somewhere that since dogs don't have a language or words, that their thoughts are comprised of pictures. So if you think in terms of pictures, they have a sort of sixth sense to be able to see that and hence read your mind.
Have no idea how true it is. I think in terms of a jumble of pictures and words and I've never really consciously tested the theory...don't really know if it's even possible. But for some reason, in my mind, it makes sense and I think it's a pretty neat theory.
Do you recall thinking of the office and your keys in terms of pictures...?