Re: Powerpc (mac-G4) -essentially (hardly) broken
Liam Bedford wrote:
On Tue, Jan 22, 2002 at 06:54:56PM +0000, Nick Bailey came forth with:
Now apple-3 produces the # sign (look!! --> # <-- little things please
little minds!) as advertised. I also have to get the tilde/grave key to
produce tilde/grave (it produces < or > in the console, and the
plus/minus / section key -- top left of the keyboard -- does the
tilde/grave thing) It took ages to find this out: the key is inbetween
the left hand shift key and the Z, so I don't understand why X thinks
it's AC11. It returns kecode 94 according the xev: this is strange
because that's the code for KP4 according to the keycodes file I looked
in. I don't know what's going on here, but this fixes it (and changing
KP4 stops the 4 on the keypad from working, so at least that's consistent).
key <AC11> { [ grave, asciitilde ] };
I do apologise: this is a wretched lie. I am now totally confused.
After starting the system from cold this morning, it turns out that
<AC11> wasn't the right key (it was '/" I think) so I've still no idea
how I got the tilde key to work. I tried all the other keycodes I
thought I might have used by accident, but no dice. I am getting bored
with this game and might give up. At least the # key still works 8-)
more games :)
you can find the keycodes from
/etc/X11/xkb/keycodes/xfree86
Then, you can contrast that with
/usr/src/linux/include/linux/input.h
OK, that's not installed on this Mac, so I did showkey and dumpkeys
instead. showkey says the keycode I want for the key with a ~/` written
on it was 86 (dumpkeys says 86 should produce </> and at the console it
does). Armed with this I looked in keycodes/xfree86, and found
<KPAD>=86, but change that to ~/` and you loose the keypad-+ (??) in
favour of ~/` instead.
So I looked at what xev was saying again. It claims:
KeyPress event, serial 22, synthetic NO, window 0x1c00001,
root 0x32, subw 0x0, time 2460958937, (74,27), root:(78,819),
state 0x0, keycode 94 (keysym 0x0, NoSymbol), same_screen YES,
XLookupString gives 0 characters: ""
According to .../xfree96, that's <BKSL>=94, but then if you redefine
<BKSL>, guess what? you loose the Backslash key (suprise).
So I looked at .../linux/include/linux/input.h on my laptop (we're all
using linux keycodes now, right?) and it turns out that
#define KEY_F19 94 //at least I can type # now! Oh joy 8-)
is in there. Nothing remotely like F19 in .../xfree86. I tried
redef'ing <FK19> as a long shot but no dice.
that should get you going on what keys are producing what keycode... I found
that xev returns a different code to the one you're looking for.
Yes, I don't understand why. Maybe if I was a bit older and wiser and
had built some real X programs... Perhaps something very silly is going
on here, like I only get to see the keycodes changed after a reboot?
I'm doing a /etc/init.d/kdm restart, and assuming everything will be
reread.
(I found out far too much about this stuff when I needed to make a map for
the keyboards on our product... it's really weird and confusing for a while)
L.
I hope it doesn't come to that. I hate knowing anything. Knowing too
much must be dreadful 8-)
I am giving up on this now unless there is anybody who can offer
enlightenment. I must do some work, then have a go at libarts. Aghh!!!
(or in fact, Shhhhhffff!!!) One little thing, and it will all be perfect...
Thanks,
Nick/
Reply to: