I don't think it would work.

The keyboard sustain pedals are a trigger to an effect built into the keyboard, not something that the pedal has and you get the effect on the keyboard when you connect the two.

Unless of course you're talking about using it to trigger a boss pedal...then it might work. If thats the case you should be more specific in your threads.
Major of 7 String Legion 7 > 6

Carvin DC747
Ibanez RG2228
Schecter Avenger Custom Shop
and my baby....
Gibson Explorer Studio
using a fs-5u would be far easier, as the keyboard pedal has a longer distance to travel to switch between on and off, so your tempos would be a bit out. it should work though, becuase it's just a non-latching footswitch. also, the keyboard pedal looks bigger.

Gretsch White Falcon

Fender Volume-Tone
TC Electronic Polytune
Digitech Whammy
Vox V847-A
Ibanez TS9
Menatone Red Snapper
Marshall EH1
Boss DD7
Boss CE5
EHX Cathedral
Vox AC15CC1
George L's