According to often-repeated legend Lord Kingsale retains a royal privilege that allows him to keep his hat on in the presence of the sovereign. This right allegedly was granted by King John in the 13th century. The problem with the story is that it doesn’t appear to be based on any historical fact.
Another who is supposed to hold that right is the master of Trinity College, Cambridge. Whether this is true or not, it would seem that the better practice is to go ahead and remove the hat. When Queen Victoria visited the university, the master of Trinity retained his hat and reminded the queen that he could do so by decree of royal privilege. Victoria responded, “In the presence of the sovereign — yes. But not in that of a lady.”