Not so fast, there, altitude909. Cheapest, most common pedals are set for either mometary OPEN circuit, or momentary CLOSED circuit. If you use the wrong one, you get sustain when the pedal is NOT depressed, no sustain when it is.
Google the keyboard you have, and look at either it's spec sheet or user manual. That should tell you what type of switch you need- and assuming the keybaord has a standard TS 1/4" jack, you can buy anybody's switch and it will work.