Re: Please Help, Keymapping still hosed.


Subject: Re: Please Help, Keymapping still hosed.
From: William K. Gibson (firstdesk@columbus.rr.com)
Date: Fri Mar 16 2001 - 09:56:24 MST


on 3/14/01 1:32 PM, Hollis R Blanchard at hollis+@andrew.cmu.edu wrote:

> In /etc/rc.d/rc.sysinit, I have the "Load keymap" section commented out.
> Also, I have the keytable init.d script off (chkconfig keytable off).

Ooookay, that did the trick.

After searching around the internet I found quite a bit of obscure and
esoteric information about all this stuff- including how to get X windows to
work. This stuff is waaay complicated and none of what I needed was in one
place. I guess I can't complain too much because of having the latest
hardware.

Here is one piece of the puzzle:

from
http://homepages.munich.netsurf.de/Franz.Sirl/inputppc.html

---begin quote---
you shouldn't load any "mac-*" maps anymore with loadkeys, this will corrupt
your keytables. Load standard Linux keymaps instead, eg. instead of
mac-de-latin1-nodeadkeys, load de-latin1-nodeadkeys.
---end quote--

I actually haven't done the above yet, I just commented out the Load keymap
section like you did.

In regard to X-windows, I tried to use other people's XF86Config files but
they would not work. So I ran Xconfigurator and it actually worked, yay. But
I still had three problems:

1. The mouse would not move

2. All the working modelines were 1152x864, which put the bottom of the
virtual screen below the actual screen.

3. Just like in my console, the keyboard for X windows was wrongly mapped.

For problem 1, I discovered through some digging that the 2.4.2 kernel will
not use /dev/mouse anymore, but now uses /dev/input/mice This is better
because it allows usage of both adb and usb mice from the same place
("mieces to pieces" <- obligatory obscure cartoon quote).

This I found also at
http://home.munich.netsurf.de/Franz.Sirl/inputppc.html

---begin quote---
Mouse changes:
Benjamin's current kernels are preconfigured to be mostly compatible, just
/dev/adbmouse will be nonfunctional by default. All ADB mice and mouse-like
devices end up as /dev/input/mouseX now and will be mixed onto
/dev/input/mice. If you update your dev package to dev-2.7.18-3b.ppc.rpm or
better, all you have to do is to configure gpm, XFree86 and MOL to use
/dev/mouse with protocol IMPS/2. Xpmac with USB mouse support (eg. rev10) is
able to autodetect this and works like before.

All mouse events end up on /dev/mouse with a common protocol (IMPS/2),
including a new artificial mouse button emulation device. This emulation
device lets you use mouse button emulation (see below) even with USB mice
now :-).

---end quote---

Here's another fun one about using the mouse:

from
http://www.imaclinux.net/php/imaclinux_faq.php3?single=159

---begin quote---
After that you have to point GPM (the textmode mouse cut&paste tool) and
XFree to this device to use it - GPM should be called like:
gpm -t ps2 -m /dev/input/mice

And in X:
Section "Pointer"
Protocol "ImPS/2"
Device "/dev/input/mice"
ZAxisMapping 4 5
EndSection

When you do all of the above, you can use your USB mouse and keyboard

---end quote---

After discovering this, I had to edit /etc/rc.d/init.d/gpm to make the call
given above. Oops, but wait, gpm uses MOUSECONFIG variable which gets its
contents from the /etc/sysconfig/mouse file. Whose contents I had to change
to ps2 instead of Busmouse (yes ps2 instead of ImPS/2- the information for
which I found on some other obscure site that I cannot remember).

The XF86Config file changes worked too. OK, the mouse is working in the
console and in X!

On to problem number 2....

I found somebody's "Monitor" section they used and stuck it into XF86Config:

from
http://www.powerbooklinux.net/php/powerbooklinux_g_h.php3?single=53+index=0

---begin quote---
Section "Monitor"

Identifier "lcd0"

HorizSync 30-64
VertRefresh 40-150

Modeline "1152x768" 89.9 1152 1216 1472 1680 768 868 876 892 -HSync -VSync

EndSection
---end quote---

Ok, that took care of the screen size problem!

On to problem number 3...

There were conflicting sites on this issue.

from
http://www.powerbooklinux.net/php/powerbooklinux_g_h.php3?single=53+index=0

---begin quote---
to configure your keyboard to be mapped correctly I used:

XkbRules macintosh
XkbModel macintosh
---end quote---

from
http://home.munich.netsurf.de/Franz.Sirl/inputppc.html

---begin quote---
you have the choice between the use of Linux keycodes and the use of ADB
keycodes via this settings in XF86Config:

      Option "XkbModel"       "macintosh_old"
or
      Option "XkbKeycodes"    "macintosh"

will switch on the use of ADB keycodes (usage of XkbKeycodes is deprecated
by the XF4 people, so please use XkbModel). If none of these are present,
XF4 will default to Linux keycodes, which should be great news for PREP/CHRP
users with PS/2 keyboards :-). You can switch between a Macintosh style
keyboard layout and PC style keyboard layout with

      Option "XkbModel"       "macintosh"
and (eg.)
      Option "XkbModel"       "pc105"

These options are only necessary for old kernels or if the /proc filesystem
is not available for some reason, otherwise the patched XF4 will
autoconfigure itself to the right mode, depending on the contents of
/proc/sys/dev/mac_hid/keyboard_sends_linux_keycodes.

---end quote---

I decided to go with the first quote on this one, because it mentioned
XkbRules as well (not that I understand it). So I edited my XF86Config file
to contain those values, but I commented out the deprecated XkbKeycodes
option as suggested by the second quote.

I called startx and whoopie! it worked! The keys are sending the right
keycodes. Unfortunately the arrow keys refuse to work so I have to use the
emacs control keys, but maybe I can finagle something about that later. I
still don't understand everything that I did, but I'll take the "ain't broke
don't fix it" attitude until the next issue. Oh, which happens to be
MacOnLinux not working. I'll tackle that next.

Thanks to everyone that helped.

--William K. Gibson
1stDesk Systems
firstdesk@columbus.rr.com



This archive was generated by hypermail 2a24 : Fri Mar 16 2001 - 09:55:56 MST