Bug#239035: mac/ADB keymaps inappropriate for powerpc
On Tue, Mar 23, 2004 at 10:07:17AM +0000, Alastair McKinstry wrote:
> Hi Colin,
>
> Thanks for your report.
>
> Looking at your patch, you removed mac_kbd.c from powerpc.
> I'd prefer to do the following: check in mac-kbd.c:
>
> fd = open("/proc/sys/dev/mac_hid/keyboard_sends_linux_keycodes", O_RDONLY);
>
> if ((fd < 0) || (read(fd,&c, 1) != 1)) {
> di_info ("Failed to open /proc/sys/dev/mac_hid/keyboard_sends_linux_keycodes;
> Assuming not adb");
> k->present = FALSE;
> return keyboards;
> }
> close(fd);
> if (c != '0') {
> di_info ("Sending linux keycodes ; not using ADB keymaps\n");
>
> k->present = FALSE;
> return keyboards;
> }
>
>
>
>
> This allows kbd-chooser to be used on a running system
> as well as in d-i. Can you please verify this would work
> as planned on powerpc?
>
> On review, it was a mistake to couple "architecture"
> (AT / USB / etc.) to keymap choice in d-i. All the
> keymaps in console-keymaps-usb are for the mac keyboards;
> "PC" USB keyboards use AT keymaps; etc.
Oh, this is why the USB keymaps never worked on pegasos, nice to know.
> - Read the USB vendor code from /proc/bus/usb/devices ;
> if the keyboard vendor != Apple, don't use the "USB" (Mac USB)
> keymaps.
> - If in kbd-chooser.c we find no keyboards, and we're not using a serial console,
> use AT keymaps.
Ok for me, colin and other (oldworld) pmac users should confirm this
too.
Friendly,
Sven Luther
Reply to: