Re: Possible bug in keyboard.c (2.6.10)

From: Dmitry Torokhov
Date: Wed Jan 26 2005 - 23:52:05 EST


On Wednesday 26 January 2005 22:16, Sasa Stevanovic wrote:
> Hi,
>
> I had some problems with my laptop's onetouch keys and it eventually led me to
> keyboard.c file from 2.6.10 kernel (Vojtech Pavlik and others). There may be
> a bug in the file, please read below.
>
> Well, actually, when all omnibook/messages/setkeycodes/hotkeys/xev/showkey etc
> stuff is stripped off, what remains is that x86_keycodes array has only first
> 240 members initialized, while remaining 16 are set to 0 due to [256]:
>
> static unsigned short x86_keycodes[256] = { <only 240 here> };
>
> (For my scenario, workaround was possible.)
>
> I am not sure if this is a bug or not; it worked in 2.4.18 without workaround.
> Might be that someone wanted to prevent reading invalid memory. There are
> many versions of the file/array definition found on the web, none of which has
> a comment about this.
>

>From Vojetch Pavilk:
> I'm sorry, but X only understands the RAW PS/2 protocol, and that one
> can only transport keycodes up to 240.
>
> For keycodes above 240, XFree86 would either need to use the MediumRAW
> mode, or use event devices for parsing the keyboard.
http://www.ussg.iu.edu/hypermail/linux/kernel/0406.0/0544.html

You still did not describe what kind of problems you are having with your
keys.

--
Dmitry
-
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/