Common problem in Studio One it seems.
Have you checked the keyboard sustain pedal on a standalone VSTi? If it doesn't work there then it's the pedal or keyboard that's the problem. If it does then it's a Studio One issue. The latter is more likely if my experience since Studio One v1 is anything to go by. Seems from the number of people who report this problem that S1 is just flaky in this area and that no one has yet really figured out what causes it..
Anyhow, this is what Presonus Support suggest you do....
"When [Sustain does not work in Studio One] please open the Midi Monitor (View menu > Midi Monitor) to see if data is streaming there in real time. If the issue is intermittent, it may be the keyboard or midi device if it doesn't connect directly.
"Please connect and power your keyboard and audio device and send us an NFO file...
To access your PC’s System Information on Windows 8 and Windows 10:
1. Go to the Desktop.
2. Press [WinLogoKey] + R to bring up 'Run'.
3. Type 'msinfo32' without quotes.
4. Press the [Enter] key.
5. IMPORTANT: Click File then "Save...", save this file as a .nfo file format and rename the file your name and attach it to this email.