I have a usb rfid reader that basically shoves the char's into the keyboard buffer.
It is running on a Rpi Zero 2 W.
However in FB using Inkey it takes two attempts after a reboot to start working reliably.
That means the first login of the day has to be done twice.
The char show up as a 10 digit number terminated with a cr.
If I reboot and simply open terminal and scan a Tag, it works immediately.
If I run a Notepad type of program, it works correctly straight away as well.
In Geany it works immediately.
However with FB I need to scan it once , then scan it again to get the result.
After that it will work on the first go all day, until the next reboot.
I have reset the usb port to solve the problem to no avail .
The code below is simple enough.
It is almost like FB needs to see one transaction before it recognises it as keyboard input.
Code: Select all
Keys = InKey
If Asc(Keys) > 0 Then
If Asc(Keys) = 27 Then QuitRun
If Asc(Keys) >= &H30 Then
Print Keys
RfidStr += Keys
Else
If Asc(Keys) = &H0d Then
If Len(RfidStr) >= 10 Then
'--------------------------------------
Hopefully someone can shed some light on this.
Regards