I have a question regarding scanner behaviour, which I find odd. I have a USB scanner Motorola DS4208 that is configured as USB HID Keyboard + Emulate Keypad option. Emulate Keypad means: Enable this to send all characters as ASCII sequences over the numeric keypad. For example ASCII A transmits as
“ALT make” 0 6 5 “ALT Break”.
When I try to scan a barcode into console, the barcode transmits itself as number values as ASCII sequences. However in virtual console (Ctrl + alt + f1) the barcode is scanned correctly. Can I somehow replicate this behaviour in X11 or is it not possible?
Plug in the USB scanner, then have a QR code printer on paper. OpenSUSE Tumbleweed → open terminal or any text editor for that mattter to test the output of the scanner. Then I try to scan the QR code with the scanner and the output in GUI is the numbers I sent in my first porst. But when I press ctrl + alt + F1 and then login in the virtual console (not necessary) I scan the barcode and the QR scode is scanned properly.
Xfce GUI. The emulate keypad option is doing that which is a configuration of the scanner. I am wondering if I can somehow replicate virtual console’s behaviour in X11.
I am not sure I understand this, but I see there also an A → 065 translation. I guess that the Alt key simulation is not functioning as you think it should.
I tried to simulate what you say the device does and (KDE) started Konsole. Then switch NumLock on. Then pressed down Alt and typed: 0 6 5 0 7 0. This is what happened:
henk@boven:~>
(arg: 65070)
Then I went to Ctrl-Alt-F1 and logged in. Doing the same, I get
It is a pity that no other members seem interested in this problem, or simply do not know any answer or suggestion.
BTW, I do not need the numerical keypad for this. Just pressing Alt and then typing the number keys at the top of the “normal” keyboard gives the same.
Linux obviously knows what is the ASCII representation of a character, let’s say ‘A’ which is 65. When I type this command in virtual console: ‘showkey -a’ and then press the key ‘A’ it shows this:
A 65 0101 0x41
When I press Alt + 65 in virtual console I get ‘A’
During the above discussion we found out that nothing is wrong with the scanner. The problem lies in the interpretation of the pressed down Alt key during the typing of a number. It works as you want (sending the corresponding character) on the virtual console, but not when using konsole (or any other application within a KDE session).
Maybe starting a new thread with a title like “Entering characters by using Alt with decimal number differs on virtual console and konsole” might draw new attention to the problem.
Then describe you found this with the device, but that it can be done using the keyboard solely on the virtual console and konsole (and other programs) in KDE. (and maybe show my examples).
Of course you can place a link there to this thread for completeness.