keyboard raw mode



I have a special POS keyboard that comes with a
magnetic swipe reader. When a card is swiped, the
keyboard prefixes the card data with a seqneuce
starting with "1d 9d 9d". I guess this design is to
allow applications to tell card swipes from key
presses, as the two left control break codes "9d 9d"
cannot be generated from key presses.

The keyboard worked fine with kernel 2.4.7. If I put
the keyboard in raw mode, I can receive the sequence
"1d 9d 9d". A simple test can be done with "showkey
-s". However, newer kernels seem to treat the second
break code as a hardware error, which in my case it's
not, and simply discard it.

While it's necessary to have a work around for certain
hardwares that tender to produce such errors, but why
would the fix be done at "raw" level? In raw mode, I
would expect to receive whatever is generated from the
keyboard, including possibly errors. If I decide to
put the keyboard in raw mode, I assume the
responsibility of handling raw data.

Along the same line, why would atkbd.c complain about
"Unknown key code..." when an unknown key is pressed
in raw mode (e.g. "showkey -s")? It shouldn't care if
I just want to get the scan codes, should it? I have
to do setkeycodes before I can see the scan codes!?




__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



Relevant Pages

  • Re: keyboard problem with 2.6.6
    ... If an application wants to access directly the keyboard, ... If there are no such programs, why the raw mode emulation is there then? ... Another reason is that previously Linux didn't offer event-based ...
    (Linux-Kernel)
  • Re: keyboard problem with 2.6.6
    ... > If an application wants to access directly the keyboard, ... > provides some kind of interface for driving directly USB devices. ... reason using PS/2 protocol to talk to the kernel. ... > interface to keyboards without raw mode. ...
    (Linux-Kernel)
  • raw keyboard for vga -- vnc with no mosue
    ... It works in X but I need it with vnc, ... Since it's svncviewer, I looked at libvga.config and foud the ... the manpage) that it works only with the keyboard in raw mode. ... If, of course, I issue kbd_mode -s, my keyboard becomes unusable ...
    (Debian-User)
  • Cant get SVGLIB running
    ... I am having trouble to get SVGALIB running. ... Does anybody have such a Nvidia TNT card ... but only works with some programs that use raw keyboard. ... # These are prefered over the default timings (if monitor and chipset ...
    (freebsd-questions)
  • Source-code editing and a QWERTY HP... (very long)
    ... its capabilities and especially its larger QWERTY keyboard. ... an SD memory card slot for cheap and plentiful storage! ... Let's say that I have a program called SUNRS in the current directory ... If there is no SUNRS source file on the SD card, ...
    (comp.sys.hp48)