mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Chris Heath <chris@heathens.co.nz>
To: Andries Brouwer <aebr@win.tue.nl>
Cc: Jamie Lokier <jamie@shareable.org>,
	linux-kernel@vger.kernel.org, vojtech@ucw.cz,
	Ralf Hildebrandt <Ralf.Hildebrandt@charite.de>
Subject: Re: keyboard - was: Re: Linux 2.6.0-test4
Date: Thu, 04 Sep 2003 23:41:38 -0400	[thread overview]
Message-ID: <20030904225728.C7CB.CHRIS@heathens.co.nz> (raw)
In-Reply-To: <20030905021955.A3133@pclin040.win.tue.nl>

> > Are you saying that it isn't possible for i8042.c to simply pass all
> > events (including duplicates) to the keyboard driver to sanitise?
> 
> I am saying that I would like nothing better than that.
> But it is a fundamental change of setup.

Well... I think the overall design is the right one.  The atkbd driver
expects to be talking to an AT keyboard, usually using Set 2.

However, the bytes that come from the i8042 are a mixture of Set 1 and
Set 2.  Set 1 because the key releases have their 8th bits set, and Set
2 because we get the non-XT keys escaped with E0. I guess the keyboard
is sending Set 2 and the BIOS is translating the set 2 codes to set 1
for "compatibility with XT software".

So the i8042 layer is IMHO the right place to untranslate this mess back
into normal Set 2.  The problem is that the BIOS translation is not
invertible, so we have to hack the untranslation as best we can.  The
current algorithm is to untranslate all bytes 0x00-0x7f, and to
untranslate the others only if there was a previous key press.  This
means the i8042 layer has to know about scancodes, knowledge which
probably only belongs in the atkbd layer.

Probably, now that I think about it, the sanitization of duplicate key
releases should rightfully be part of the atkbd layer, because those
codes are actually being sent from the keyboard.

But either way, the problem remains to find a good untranslate
hack^Walgorithm.  Because we are getting duplicate key releases, we have
to make sure they they are either untranslated or removed.  Sending them
through unchanged, as we were in -test1 causes lots of grief to the
atkbd layer.

At this late stage, I don't think it is a good idea to completely
rewrite the untranslate algorithm.  So we continue to hack it and hack
it until it works.  :-/

Chris


  reply	other threads:[~2003-09-05  3:52 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-09-04  4:09 Chris Heath
2003-09-04 20:48 ` Jamie Lokier
2003-09-04 22:34   ` Andries Brouwer
2003-09-04 23:00     ` Jamie Lokier
2003-09-05  0:19       ` Andries Brouwer
2003-09-05  3:41         ` Chris Heath [this message]
2003-09-05 10:08           ` Andries Brouwer
  -- strict thread matches above, loose matches on Subject: below --
2003-09-05 14:57 John Bradford
2003-09-05 23:45 ` Andries Brouwer
2003-09-05 13:46 Norman Diamond
2003-08-31 16:22 Chris Heath
2003-09-02  8:07 ` Ralf Hildebrandt
2003-09-02 10:47   ` keyboard - was: " Andries Brouwer
2003-09-02 11:18     ` Ralf Hildebrandt
2003-09-02 12:32     ` Ralf Hildebrandt
2003-09-02 21:41       ` Andries Brouwer
2003-09-03  7:45         ` Ralf Hildebrandt
2003-09-03 13:25         ` Ralf Hildebrandt

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=20030904225728.C7CB.CHRIS@heathens.co.nz \
    --to=chris@heathens.co.nz \
    --cc=Ralf.Hildebrandt@charite.de \
    --cc=aebr@win.tue.nl \
    --cc=jamie@shareable.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vojtech@ucw.cz \
    /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®