lkml.org 
[lkml]   [1999]   [Dec]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: keyboard scancodes
On Fri, Dec 10, 1999 at 05:36:45PM +0100, Andries.Brouwer@cwi.nl wrote:

> It is clear that it is about time to redesign the kernel
> keyboard handling, on all levels. The old setup was very
> flexible, and was good enough for the past six years or so,
> but these days it becomes urgent for the low level handler
> to handle keyboards with more than 128 keys and more complicated
> escape sequences, and for the keymap level to better handle
> UTF-8 and Unicode. We also need a bit more flexibility in
> the handling of diacritical signs.

Well, I've already started such a rewrite, if you're interested,
look at:

http://www.suse.cz/development/input/

> For these PC keyboards it seems the proper solution would be
> a finite state machine, with tables that can be loaded from
> user space, a little bit like setkeycodes does today, but
> much more general. The traditional keybaord would then have
> three scancode maps (the plain one, one for e0 and one for e1)
> and people for whom e0 is not an escape symbol would only
> have the plain map, and people for whom also 80 is an escape
> symbol would have a fourth map.

Well, I think the right solution is to switch AT->XT code translation
off in the i8042 - after that, the keyboard scancodes are *ALOT*
simpler - the i8042 really mangles the data ...

And, if your keyboard also supports switching off the PS/2->AT code
translation inside it, and you do that, you get one-byte-per-keypress
and the same byte prefixed with 0xf0 for release. A truly simple
protocol to handle.

All i8042's I've tested (and I've tested a lot of them) support
switching the AT->XT conversion off. Most keyboards (not all,
but that isn't too big a problem) support switching the AT emulation
off, too.

So, the driver can be quite simple, if it tells the hardware not
to make the protocol unnecessarily complex, believe me ...

> I am reasonably well aware of the PC situation. However,
> the notes mentioned do not have any information about
> Sparc and Apple keybaords, etc. Additions or pointers to
> information are welcome.

My patches also include a new Sun Type4/5 keyboard driver, but
ppc, and m68k are still untouched by it ...

--
Vojtech Pavlik
SuSE Labs

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:55    [W:0.125 / U:0.768 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site