Move key selector to template