Stick one of these into a Raspberry Pi and you can then use rtpMIDI to send the MIDI data to the computer over Wifi.
https://www.matrixsynth.com/2019/03/tecontrol-usb-midi-pedal-controller.html
[video:youtube]
https://www.tecontrol.se/products/usb-midi-pedal-controller