1.The sustain is controlled inside the keyboard by midi CC64, however the sustain pedal jack only reads out two values - 0 and 127. But the control pedal jack can get continuous values, as CC11. So what I should do is to plug the pedal into control jack, get CC11 messages out and reroute them back as CC64.
2.The python package mido is handy to do such conversion (if needed I can post some code), and I got something else playing with it. For example, you can get a knob to work as a "pitchbend knob" without centring but at least with detent. Or you can get the pedal to work as a one-way pitchbend, or vibrato, etc.
Anyway, having half-pedalling is a good thing for piano playing and I'm going to get a Roland DP-10.
