Keyboard trouble with XF 4.0.1

Benjamin Herrenschmidt bh40 at calva.net
Mon Oct 23 23:32:46 EST 2000


>
>OK, this argument is relevant for the case of "linux" keycodes, where
>the same keymaps are now supposedly used on PCs and on Pmacs.
>
>For the case of ADB keycodes, this argument is empty. Or are there other
>machines than Pmacs that now use the mac_keycodes[] translation table
>and macintosh keymaps and that didn't use macintosh keymaps before? It
>is in this case that the backwards compatibility problem appears. For
>the "old" input layer, one needed different keymaps for ADB and USB
>keyboards (differing by swapping those 2 keys).

That's more complicated. Some ADB keyboard have the same layout as
equivalent PC keyboard. Some have not. (Depending on the country). The
"swapping" of the corner key depends on ISO vs. ANSI keyboard and is now
handled by the driver, so an identical keymap should be used in both cases.
With the Linux keycodes, a "standard" keymap should work for any USB
keyboard or any ADB keyboard with a "standard" layout. For those having a
specific "Apple" layout, you still need a specific keymap (like French),
but one single keymap should now handle all cases for the "corner" key.

>Now with the new input layer one needs the same keymap, and the decision
>is whether this is the old ADB keymap or the old USB keymap. Right now,
>it is the old USB keymap. If I understand this correctly, it suffices to
>swap the numbers "10" and "50" in the mac_keycodes[] table in
>drivers/input/keybdev.c to obtain compatibility with the old ADB
>keymaps. Or maybe one additionally needs to swap the positions 10 and 50
>(the numbers "41" and "86") in adb_to_linux_keycodes[] in
>drivers/macintosh/adbhid.c? I am too tired now to understand this.

The linux keycodes are completely different keycodes. (based on PS/2
keycodes currently). The "old" keycodes are ADB keycodes as they used to
be. When enabling ADB keycodes, both ADB and USB keycodes are converted
to Linux keycodes and then back to ADB keycodes with the abdhid.c. That's
a bit hackish, but it ensures consistency, and we expect everybody to
switch to linux keycodes over time.

>Anyway, there are more important problems to solve :-)

Yup ;)

Ben.


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/





More information about the Linuxppc-dev mailing list