Mini class to work with PCsensor footswitch from C#.
This class is using LibUsbDotNet. First install it and add device filter. Example of usage:
var footswtich = new FootswitchListener();
try
{
footswtich.StartListen();
footswtich.Press += () => Console.WriteLine("Pressed button");
footswtich.Release += () => Console.WriteLine("Release button");
catch (Exception fe)
{
Console.WriteLine(fe.Message);
}