I have a simple RFID reader that actually behaves as a keyboard and reads with the return letter at the end.
I want my application to be heard only by a single (separate) keyboard device (which I will choose / I'll choose in some way) and get the value of not reading any meters for me where the focus form / Is on the app.
The application is written with QT C ++
I'm thinking this is possible and how?
It does not know that it helps, but to find the input from the barcode scanner, There was a similar challenge. Scanner just "typed" in just a few digits; really fast; Some scanners end it with a control character, but because it is not universal, we can not even trust it.
I saw a We have created an application-wide event filter ( QEvent :: keyboardLayoutChange when the barcode scanner started its input, but I'm not sure that it applies to all possible scenarios - but you You may want to check for.
QApplication :: installEventFilter ) which is the keystroke (
QEvent :: ShortcutOverride or
QEvent :: KeyPress < / Code>) and decides on the basis of criteria such as the infected number sequence, very short time interval, etc., that it was a barcode input. This is a clear loss, but if you need a very general solution then you may be interested in something similar. In addition, if RFID input always gives a control character, then it makes this approach quite straightforward.
No comments:
Post a Comment