in reply to A key called keys in a hash in Template Toolkit

TTBOMK you can't, that's the downside of the simplified dot syntax. What you can try however is to iterate the hash without using .keys. Template::Manual::Directives has this example:

[% FOREACH u IN users %] * [% u.key %] : [% u.value %] [% END %]
FOREACH automatically sorts by key if you use the iterator that way.