Mary, no it has to do with the object. And it’s not so much absolute distance as it is the relationship between the hat and the listener. I look at it this way:
Pointing to an object (say a hat) in the distance: kēlā is my hat on the top shelf
Referring to a hat your friend is wearing: I love kēnā hat!