This is the pedal input circuit on the P45 piano: A ¼″ tip, ring, and sleeve (TRS) connector is the input socket. Tip goes to a positive supply voltage through a 470 Ω resistor, the ring is the input pole going directly to a processor IC with a 100 ㏀ pull‑down resistor to ground there, and the sleeve goes to ground through a 1 ㏀ resistor. The capacitors are very small value caps (around 100 pF to 100 nF), along with the coil, to reduce any input noise. The diodes are protection for the input circuit from voltages above or below the supply rails. Likewise, the 100 Ω resistor will be some input protection for the IC.
When a basic two‑pole tip and sleeve connector is used, the ring and sleeve are joined together, and the (ring) input is pulled up towards the tip voltage when the switch is closed, along with the sleeve. Depending on the foot switch, this could be when it's pressed, or when it's released. The supplied one opens when pressed.
For a TRS connector, a basic footswitch connects tip and ring together. Again this could be when the sustain pedal is pressed, or released.
If yours works in the opposite direction (and you find that notes are sustained when you're not pressing it), keep your foot on the pedal when you switch the piano on, and then the piano will switch modes to work the other way around. But, normally, it sorts itself out if you plug it in before turning on the piano; it expects the pedal to be released, and uses whatever mode the pedal switch currently is (open or closed) to be the sustain pedal released, and the opposite to be sustain pedal pressed. If you plug the pedal in after you switched on the piano, it usually ends up working the wrong way around. It's a pecularity about how it senses the input, some pedals being a normally closed switch, also probably the piano's use of a TRS socket and most pedals being a TS jack, and you're supposed to plug the pedal in before turning on the piano.
A bit of testing discovers that the only way to have a pedal that always works the way you expect it (sustains when pressed), and doesn't matter whether you plug it in before or after turning the piano on, is to have a normally‑open switch (that closes when the pedal is pressed) wired between tip and ring on a TRS jack (or tip & sleeve on a TS jack). If you want to modify a simple pedal switch to always work in the normal way, or choose the mode on a configurable pedal, that's how to do it. But that's not how they've wired their supplied FC5 pedal (theirs is a normally‑closed switch).
A fancier foot switch with a TRS connector could have the switch toggling between connecting the ring to either the tip or sleeve. An even fancier pedal, like the Yamaha FC3A, would use a variable resistor instead of a switch, which would allow for a variable amount of dampening (which this piano does support), which's called half‑pedalling.
Because the piano has a hair trigger between no sustain and sustained, you need some way to make the full range of the potentiometer's travel have only a small affect on the control voltage. Hence why it has resistors either side of it. From what I've gleaned from other sources, the whole tip to sleeve resistance should be somewhere around 10 to 50 ㏀, but out of my box of available spare parts I ended up having to use a 1 ㏁ trimpot. I didn't go buy some other values to experiment around with, since it's working okay. And the high resistances might avoid this pedal behaving oddly with other gear, just paying attention to the switch contact closures (for instance, a friend has borrowed my pedal to use with their Juno synth at a gig).
My test rig was much more basic, so I didn't have to fit a variable resistor into a tiny space inside a foot pedal and create a mechanical linkage, I fitted one across the output of a break‑before‑make switch. When the switch is pressed or released its contact connects to either the tip or the sleave. Part way through its travel its contact doesn't touch either pole, and the resistors wired across it will provide a half‑pedal control voltage.
It proved the concept of half‑pedalling on the foot switch, and that the piano did actually respond. But was very difficult to find the position it worked at. To be workable, I think a second, stiffer, shorter, spring would need to be installed in the pedal, one that comes into play around the mid‑point. I did try putting some squishy packing foam inside the mechanism, but it didn't have the right density to be useful.
A later experiment with my Xtreme accessories FS310 pedal involved screwing two microswitches to the side of the metal foot inside the pedal, with their levers bent at different angles so that one clicked‑over as soon as the pedal was pressed a fraction, and other when the pedal was pressed almost all the way down. It was a bit clicky, but easy to get a half‑pedalling mid‑point (you could hear it, and there was more range of movement within the half‑pedal point). Though, at that gig, you couldn't really hear the clicking above all the other ambient sound.
To avoid the clicky sound, and to get even closer to end stops of pedal released and pedal fully pressed, I'd need to have used exposed metal contacts instead. That'd be even fiddlier to set up (in the confined space inside the pedal), and prone to muck contaminating the contacts and making them unreliable (the kickswitch in my organ's pedal suffers from that).
Being an organist, and not a pianist, my half‑pedalling skills are rather lacklustre. I've tried it on real pianos, and it's very hard to do anything predictable (finding the amount of pressure, if even possible, to get a partially‑dampened sustain). With this two‑switch modification, I can have no sustain when the pedal is released (which sounds very dead on an electronic piano with no strings to resonate), I can slightly press it and get a short sustain, or fully press it and get a long sustain. Though I find this a bit difficult to manage. Alternatively, I can fully press it for a long sustain, and slightly release it to shorten the sustain between chord changes (for instance) without fully‑dampening the pretend strings. This is within my skill level, and probably the only use I'd have for it.
About a year later; I find I'm getting better at half‑pedalling (with this rig). I've managed to get used to just putting some pressure on the pedal to get a short sustain, and pressing all the way down for a long sustain. And partially releasing the pedal between chord changes, rather than fully releasing it.
This piano sounds way too dead without any sustain, since it doesn't have any strings. And the built‑in reverb effects are very poor substitute. It's why I put the time and effort into trying to make half‑pedalling work. A real piano always has some resonance, even with the dampers engaged.
For what it's worth, I've never actually seen any pianist do half‑pedalling, they just stomp and release the pedal. And I suspect few pianists are even aware of the concept.