Firstly, it's important to note that most foot pedals have a default function. This is typically set to scroll up and scroll down so that you can completely navigate through your songs and sets with two pedals.
To change these functions, open the Actions Editor by tapping on the Actions icon in the Menubar. This is located just to the left of the song title. Choose the Pedals tab at the bottom and then swipe until you find a foot pedal that matches the product you are using.
Setting a different action is easy. Just press the button or switch on your foot pedal, or tap the area on the screen. OnSong will open the Actions Menu to display the actions that are available. Actions are organized by category, noun, and verb order. For instance, if you want to toggle Autoscroll, find the Autoscroll category and then locate Control. Finally, choose the Toggle action. Close the Actions Editor. Once this has been assigned to the pedal, you will be able to toggle autoscroll by pressing that foot pedal.