input handler for the menu