Can anyone help me figure out how to use evdev
python module? I have a usb card scanner that I want to use to scan a card and make a raspberry pi play some music file through Kodi media player. I can scan the card and get the info from it but since this card reader is recognized as a keyboard it also sends key presses to kodi. Is there a way to force python to only read the card number that is encoded on the cards and not send an extra enter key press at the end?
At the moment when I scan a card in an open text file editor like kate
for example it look as follows:
0009817066
newline with nothing on it (sorry I have no idea how to input an empty line in this view)
The new line is actually an enter key press that does all sorts of bad behaviour in kodi (depending on the screen you are on it will press random buttons) also it messes up my python code behavior.
So the question is: can I tell the reader using evdev
module to only read the number and not the EOL character?
Not sure if I am making much sense, so if you have any questions please ask them.