With this python script you can capture keyboard (emulators) and barcode scanners trough evdev (event device), this way the part of code will only execute when the device is sending keys:

output:

Another python script example:

Output: …

USB – HID human interface device Lees meer »