Detect the state of a switch connected to USB with python
I would like to ask if there is a way to detect the state of a switch, connected through a usb. The switch has 2 states, on and off. Possibly with Python, on Windows.

Or, am I able to implement a script that will consider the switch to be a keyboard extension.

Thank you in advance!
Detect the state of a switch connected to USB with python
===

I would like to ask if there is a way to detect the state of a switch, connected through a usb. The switch has 2 states, on and off. Possibly with Python, on Windows.

Or, am I able to implement a script that will consider the switch to be a keyboard extension.

Thank you in advance!