Broken keycodes in recent kernels

From: Andries . Brouwer
Date: Thu Jan 08 2004 - 19:11:08 EST



Just received my tenth complaint this year about the fact
that kbd and recent kernels disagree as to what the right
keycodes are. Since I maintain kbd it follows that recent
kernels are broken.

What is right?
The old Linux convention is that for 1-88 keycode equals scancode.
Above that things are a bit messy, mainly because the 128 scancodes
xx and the 128 escaped scancodes e0 xx and the single combination
e1 1d 45 are put into 127 keycodes, and that doesnt fit.

OK. So we want at least to preserve this 1-88 range, and may worry
about the rest later. All common keys should keep their keycode.
See also setkeycodes(8).

2.6 does first an untranslate and then a map to keycode,
so the fact that keycode equals (translated) scancode
now becomes atkbd_set2_keycode[atkbd_unxlate_table[i]] == i
for i=1,...,88.

Looking at 2.6.0 we see a single mistake: scancode 84 is
translated incorrectly. And many Japanese complained.
Looking at 2.6.1-rc1 we see two mistakes: also scancode 85
is now mistranslated.

So, I think the change of 2.6.1-rc1 was not necessarily an
improvement, but 2.6.0 needs a fix.

I can look at the details, but perhaps Vojtech wants to comment.

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