Re: Please Help, Keymapping still hosed.


Subject: Re: Please Help, Keymapping still hosed.
From: Bill Fink (billfink@capu.net)
Date: Wed Mar 14 2001 - 22:53:13 MST


> On Wed Mar 14 2001, William K. Gibson wrote:
>
> Ok, I'm still looking for a solution to the keymapping problem for my
> Titanium G4 described in my previous message (included below). Please,
> somebody tell me what file I need to update and from where I can get it.
>
> Is the problem with /etc/sysconfig/keyboard
>
> Is the problem with /etc/sysconfig/console/default.kmap
>
> Is the problem with /etc/rc.d/init.d/keytable
>
> Is the problem with /usr/lib/kbd/keymaps/mac/mac-us-std.kmap.gz
>
> Is the problem with kbdconfig
>
> Is it a combination of things? Are the LinuxPPC kernels incompatible with
> the YDL build? Or is it something I don't understand. Please help, this is
> driving me crazy!

If it's any help, here's all the keyboard related stuff on my system
running 2.4.3-pre2, and all the keymappings are correct in both X and
the virtual consoles (and MOL).

Kernel config:

gwiz% egrep -i 'kb|key' /usr/src/linux/.config
CONFIG_INPUT_KEYBDEV=y
CONFIG_MAC_ADBKEYCODES=y
# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set
# CONFIG_USB_SERIAL_KEYSPAN is not set

You may also need CONFIG_MAC_HID=y (it's in mine).

Linux keycodes disabled:

gwiz% cat /proc/sys/dev/mac_hid/keyboard_sends_linux_keycodes
0

If the above is 1, you might want to try adding:

dev.mac_hid.keyboard_sends_linux_keycodes = 0

to /etc/sysctl.conf

Keyboard configuration:

gwiz% cat /etc/sysconfig/keyboard
KEYTABLE="mac-us-ext"
KEYBOARDTYPE="usb"

X configuration:

gwiz% egrep -i 'kb|key' /etc/X11/XF86Config-4 [or /etc/X11/XF86Config]
        InputDevice "Keyboard0" "CoreKeyboard"
        Identifier "Keyboard0"
        Driver "keyboard"
        Option "XkbModel" "macintosh_old"
        Option "XkbLayout" "us"

The following are optional.

I also modified /usr/X11R6/lib/X11/xkb/keycodes/macintosh to swap LMTA
and LALT so that the key labeled alt was actually the ALT key n X and so
the Clover key in MOL was the Command key for MacOS.

Here's the diff:

gwiz% diff -u /usr/X11R6/lib/X11/xkb/keycodes/.orig/macintosh /usr/X11R6/lib/X11/xkb/keycodes/.mod/macintosh
--- /usr/X11R6/lib/X11/xkb/keycodes/.orig/macintosh Tue Jan 9 08:37:52 2001
+++ /usr/X11R6/lib/X11/xkb/keycodes/.mod/macintosh Sun Jan 14 02:03:25 2001
@@ -92,9 +92,9 @@
     <SPCE> = 57;
 
     <LCTL> = 62;
- <LMTA> = 66;
+ <LMTA> = 63;
     <LFSH> = 64;
- <LALT> = 63;
+ <LALT> = 66;
     <RTSH> = 131;
     <RALT> = 132;
     <RCTL> = 133;

I made a similar modification to /usr/lib/kbd/keymaps/mac/mac-us-ext.kmap.gz
so the key labeled alt is actually the ALT key in the virtual consoles.
There is also a change to enable Control-Alt-Delete to reboot the machine
(but only when in a virtual console).

Here's the diff of the gunzip'ed files:

--- .orig/mac-us-ext.kmap Thu Mar 15 00:41:38 2001
+++ .mod/mac-us-ext.kmap Thu Mar 15 00:41:49 2001
@@ -86,14 +86,15 @@
 keycode 51 = Delete Delete
        control keycode 51 = BackSpace
        alt keycode 51 = Meta_Delete
+ control alt keycode 51 = Boot
 keycode 52 =
 keycode 53 = Escape Escape
        alt keycode 53 = Meta_Escape
 keycode 54 = Control
-keycode 55 = Alt
+keycode 55 = AltGr
 keycode 56 = Shift
 keycode 57 = Caps_Lock
-keycode 58 = AltGr
+keycode 58 = Alt
 keycode 59 = Left
        alt keycode 59 = Decr_Console
 keycode 60 = Right

Of course some of the above is specific to my particular system so it
may need to be modified accordingly.

Hope this helps at least a little.

                                                -Bill



This archive was generated by hypermail 2a24 : Wed Mar 14 2001 - 22:52:51 MST