mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Congjun Yang <congjuny@yahoo.com>
To: linux-kernel@vger.kernel.org
Subject: keyboard raw mode
Date: Fri, 30 Jun 2006 22:00:23 -0700 (PDT)	[thread overview]
Message-ID: <20060701050023.31696.qmail@web32009.mail.mud.yahoo.com> (raw)

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 

             reply	other threads:[~2006-07-01  5:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-01  5:00 Congjun Yang [this message]
2006-07-01  9:55 ` Jan-Benedict Glaw
2006-07-01 14:04   ` Dmitry Torokhov
2006-07-02  8:21     ` Congjun Yang
2006-07-02 15:11       ` Dmitry Torokhov
2006-07-03 20:07         ` Congjun Yang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060701050023.31696.qmail@web32009.mail.mud.yahoo.com \
    --to=congjuny@yahoo.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®