The manual tells you how, but relatively easy to do in the button config menu. You can only do it with certain buttons though.
Two ways to set the button up, either it toggles the mode every time you press it, or hold it down for AI servo when you're in one-shot, release and you go back...