Re: 2.6.0-test5 vs. Japanese keyboards [3]

From: Vojtech Pavlik
Date: Sun Sep 21 2003 - 06:07:28 EST


On Tue, Sep 16, 2003 at 03:43:05PM +0200, Andries Brouwer wrote:

> I do not think his patch is needed.
>
> So the question arises: do we need a kernel patch, and if so, what patch?
> The program loadkeys exists to load the kernel keymap with the map the user
> desires. So, if you need some particular map the obvious answer is:
> "use loadkeys".
>
> There is a small snag - until 2.4 the value of NR_KEYS was 128,
> while 2.6 uses 256. Moreover, the keys you want to change are above 128.
> So, your old precompiled loadkeys will not do - you must recompile the
> kbd package against 2.6 kernel headers, or just edit loadkeys.y and dumpkeys.c
> inserting
>
> #undef NR_KEYS
> #define NR_KEYS 256
>
> after all includes, and then compile on any Linux machine.
>
> There is no need to have knowledge of the Japanese keymap in the kernel,
> just as there is no knowledge of the German or French keymap. That
> knowledge belongs in the keymap that one loads.

There is a slight problem, and that is that NR_KEYS is (KEY_MAX+1) in
recent 2.6's and that's 512. And that doesn't fit into a byte. There
were some patches floating around to enhance the keymap loading ioctls.
They will be needed, along with a new version of loadkeys.

--
Vojtech Pavlik
SuSE Labs, SuSE CR
-
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/