Yosef Karo, Translation:Shulchan Aruch — Orach Chaim 350…
“ Paragraph 1 - A man may stand in the private domain and reach his hand to the public domain and carry objects there that he does not need where he is. He may move them around as long as he doesn't move them four amot. We do not worry that he will bring them to himself because he doesn't need them where he is. Therefore, one is permitted to stand in the public domain and take a key from the private domain and open a door there, and the same is true from the private domain to the public domain. ”
