If a player makes an intentional pass to the goalkeeper with his feet and the goalkeeper touches it with his hand, then an indirect free kick (you have to pass it first) is given at that spot.
Everything that is ruled as an indirect freekick outside the box, is an indirect freekick in the box as well and not a penalty.
If you mean the opposite player that is not teams with the Goalkeeper, than im very confused, but otherwaise, then I understand.
put it this way, if the defense passes it back to their own keeper the its an indirect, back in the early 90s it was still allowed, watch some matches of WC Italy 90 and you'll see it being done by some teams.