Open the foot pedal by removing the two hinge screws on the sides.
Open the strain relief by unscrewing the two screws holding it together.
Solder the wires to the Teensy (one to GND and one to D5), and terminate them with the female blade terminals.
Connect one wire to COM on the switch, and the other to N.O.
Mount the Teensy in the strain relief of the foot pedal, inside the included insulator. Tighten it slowly and carefully, stopping when the Teensy can't move but before it's crushed.
Compile the firmware and flash it on the Teensy.
Test that the pedal is working properly before assembling it. Press the switch and see that it's sending page up and page down keypresses as it should be.
If you want the foot switch to be quieter, glue thin strips of rubber where the two metal halves hit each other. I had good success with water-based contact adhesive, but I'm sure your favorite glue would work fine too.
Put the switch halves back together and enjoy your foot pedal.