I've been facing a problem for a few days to detect if my usb connected scanner button is pressed from a python script. I used pyinsane2 to order the scanner to scan from the code but now I want the opposite operation to wait for the scanner button to be pressed then do some logic based on the scanned item
I tried usb.core library and detected In and out hex port but couldn't find any documentation to help me do this task
Thanks in advance