Re: console-data: Broken powermac keymaps
> > IIRC keycode 0 is not a valid keycode even though it is used by a
> > few m68k systems (there's been long rants on this on linux-kernel but the
> > m68k people finally gave in and remapped keycode 0 to some unused one).
> > I picked the 0 -> 90 remapping as keycode 90 didn't appear to be used. Do
> > the Powermacs have trouble with that choice?
>
> Well, no, but the kernel does not implement it! Not on powerpc, at
> least. Where is the code for this?
arch/m68k/mac/mackeyb.c:
/*
* machdep keyboard routines, interface and key repeat method modeled after
* drivers/macintosh/keyb_mac.c
*/
int mackbd_translate(unsigned char keycode, unsigned char *keycodep,
char raw_mode)
{
if (!raw_mode) {
/*
* Convert R-shift/control/option to L version.
* Remap keycode 0 (A) to the unused keycode 0x5a.
*/
switch (keycode) {
case 0x7b: keycode = 0x38; break; /* R-shift */
case 0x7c: keycode = 0x3a; break; /* R-option */
case 0x7d: keycode = 0x36; break; /* R-control */
case 0: keycode = 0x5a; break; /* A */
}
}
*keycodep = keycode;
return 1;
}
The case 0: is missing from the corresponding function in mac_keyb.c.
I forgot what special function of loadkeys keycode 0 was used for but
perhaps it's not needed for powerpc. Suggestion: map both 0 and 90 to a.
Such a keymap ought to work on both m68k and powerpc Macs. I really
thought I just added 90 -> a and left 0 -> a in place for the original
m68k Mac keymaps.
Michael
Reply to: