On 11/20/06, Micah Roark <[EMAIL PROTECTED]> wrote:
We are having a problem with our Metrologic MS9540 (USB. HID compliant)
handheld barcode scanners and SunRay 170 and 270 clients with Sun Type 7
USB keyboards. The user has NumLock=ON, typing away on the numeric
keypad,
scans barcode with MS9540 successfully, goes back to type on the numeric
keypad and each keystroke is taken as arrow keys/directionals, though
the
NumLock LED light on the keyboard is still on.
This will happen if the scanner (which is claiming to be a USB
keyboard) reports that it has a different USB country/layout code than
the country/layout code reported by the real keyboard. When the Sun
Ray X server sees a change of country code reported along with the
scanner input it stops using the current keyboard mapping table and
switches to using the mapping table for the new country code, and
as it's doing that it wipes clean the modifier list (num lock, caps
lock ...). So when input from the keyboard eventually arrives, the X
server has forgotten all about num lock and it treats numpad keys as
cursor keys.
When the keyboard map gets replaced the X server sends a
MappingNotify event to clients that have asked for it. You say 'xev'
reports such an event, so that agrees with the mismatched country
code hypothesis. You should see another MappingNotify when you
go back to the keyboard after using the scanner.
The way to fix this is to configure the scanner to report the same USB
country code as the keyboard. Then the X server won't need to switch
tables and won't forget the num lock status when you use the scanner.
Sun keyboards always report a specific country code. Keyboards built
for the PC mass market typically report a country code of 0, which
means "I don't know what layout I am". My guess is that your scanner
is probably defaulting to sending a country code of 0 too. You need to
figure out how to get it to report the same specific country code as the
keyboard. You can see the country codes by doing:
grep \^6 /usr/openwin/share/etc/keytables/keytable.map
The country codes are in the second column. For instance, if your
Sun keyboards have a US layout then they'll report code 33.
The workaround is for users
to press NumLock again. Oddly this leaves the LED on and turns on the
NumLock modifier again and they can proceed. This problem does not
happen
when used on an IBM-type pc (ps2 or usb keyb), therefore I'm assuming
the
scanner is sending something slightly incompatible with the Sun Type 7
keyboard.
I bet the PC keyboard is sending country code 0, and so is the
scanner. As long as both are sending the same code the num
lock status will persist.
Page 55 of the Metrologic "Single-Line Configuration Guide"
has bar codes for setting various country codes. It says that the
"US Layout" is the default and doesn't show anything that looks
like it would trigger a code of 0. I hope this doesn't mean that
it considers code 0 to mean "US Layout", that would be wrong.
OttoM.
__
ottomeister
Disclaimer: These are my opinions. I do not speak for my employer.
I've read in a previous post from July that this (or similar, such as
CapsLock) can happen when the scanner is using a "different keyboard
code"
than the keyboard. The recommendation was to set the keyboard code of
the
scanner to code 0 (zero). Have spent quite a while looking for this
config
option in the Metrologic config book, unable to find. Have tried most
settings in the book, even one specifically regarding sending numbers
with
a NumLock or without (sounds strange I know), none fix this problem. The
fact they had this "NumLock" option made me think they had run into this
before. Called Metrologic, was passed to "advanced" support. Though they
claim they are Windows-only, the tech tried to help me. He did not, nor
any of his colleagues around him, know what a "keyboard code" was, or
how
to set it. He hand picked a number of the same config options I had
already tried and had me try them on the phone, as well as had me move
the
USB scanner connection from the keyboard, to the SunRay, back to the
keyboard, and no success. His ending statement was obviously something
is
wrong with the Sun equipment being "non-standard". This leaves me
frustrated and stuck in the mud.
So anyone have any ideas, or do you know of a USB handheld barcode
scanner
that does not have this problem with the SunRays?
Thanks,
--
Micah Roark, Database Manager
MailMax Direct
[EMAIL PROTECTED]
http://www.mailmaxdirect.com
254-751-1012 x229
_______________________________________________
SunRay-Users mailing list
[email protected]
http://www.filibeto.org/mailman/listinfo/sunray-users
_______________________________________________
SunRay-Users mailing list
[email protected]
http://www.filibeto.org/mailman/listinfo/sunray-users