The connection between your sustain pedal and your controller is probably inverted. You can determine whether this is the problem by watching incoming MIDI messages as you press and release the sustain pedal. Open the Global MIDI Monitor (from the Windows menu).

When you press your sustain pedal, you should see the value 127 and when you release you should see the value 0 (see image above). If instead you see 0 when you press the pedal and 127 when you release it, then this is definitely the problem. There are several solutions depending on your particular system
- If your controller automatically detects the polarity of your sustain pedal when you plugin it in, you might have been pressing the sustain pedal while powering up your controller. Make sure you are not pressing your sustain pedal while power cycling your controller.
- If that doesn’t work, check to see if your sustain pedal has an invert polarity switch (typically underneath). If it does, try changing that switch’s setting to see if that solves the problem.