Fixing the wiring on a keyboard sustain pedal
simulate this circuit &ndash; Schematic created using CircuitLab

Figure 1. Try this.

How it works:


As shown the sustain switching is normally open. Pressing the pedal completes the circuit.
Reversing the MODE switch will make the circuit normally closed. Pressing the pedal will open the circuit.


'C' indicates the common or centre pin on each switch. (You only need one side of a two-pole switch.) This is the quite similar in operation to a two-way stairs lighting circuit.