Add key function for menus