Subject: X, keymaps, xterm, and xev
To: None <port-hpcarm@netbsd.org>
From: Michael W . Lucas <mwlucas@blackhelicopters.org>
List: port-hpcarm
Date: 07/10/2003 13:13:03
Hello,

I've been having a variety of weirdness with my keyboard under X on my
Jornada, and am posting here in a desperate plea for help.  I've never
tried debugging a keyboard in X before, and Google is singularly
unhelpful.  I'll happily document in an article any advice people are
kind enough to share.

The problem can be best summarized as "weird stuff happens when I try
to type."  Here's one particular example.

I install a keymap from the mailing list archive, (the problem appears
in a variety of keymaps, including one I got from agc), fire up xev
from a separate SSH sesion onto the local display.  To demonstrate the
problem, I go into the xev box and type "test".

KeyPress event, serial 18, synthetic NO, window 0xc00001,
    root 0x25, subw 0xc00002, time 2321394756, (41,31), root:(48,92),
    state 0x0, keycode 124 (keysym 0x74, t), same_screen YES,
    XLookupString gives 1 characters:  "t"

KeyPress event, serial 21, synthetic NO, window 0xc00001,
    root 0x25, subw 0xc00002, time 2321396086, (41,31), root:(48,92),
    state 0x0, keycode 109 (keysym 0x65, e), same_screen YES,
    XLookupString gives 1 characters:  "e"

KeyPress event, serial 21, synthetic NO, window 0xc00001,
    root 0x25, subw 0xc00002, time 2321396756, (41,31), root:(48,92),
    state 0x4, keycode 123 (keysym 0x73, s), same_screen YES,
    XLookupString gives 1 characters:  ""

KeyRelease event, serial 21, synthetic NO, window 0xc00001,
    root 0x25, subw 0xc00002, time 2321397436, (41,31), root:(48,92),
    state 0x4, keycode 124 (keysym 0x74, t), same_screen YES,
    XLookupString gives 1 characters:  ""

To my utterly ignorant eye, it sure looks like we spell out "test"
under the "keysym" values.

Going by an xterm, something completely different happens.  The first
"te" appears, the "s" does nothing, and the final "t" appears but the
initial "t" disappears.

At this point, the dropdown menu in twm no longer works.  (Yes, twm is
not a good palmtop WM, but investigating WMs seemed moot when the
keyboard doesn't work. :-)

I have a full xev session of me starting up xev and an xterm and
typing "test" available at
http://www.blackhelicopters.org/~mwlucas/xev.txt, and the keymap I'm
using at http://www.blackhelicopters.org/~mwlucas/keymap.txt .

Help?  Anyone?

-- 
Michael Lucas		mwlucas@FreeBSD.org, mwlucas@BlackHelicopters.org
http://www.BlackHelicopters.org/~mwlucas/

           Absolute OpenBSD:   http://www.AbsoluteOpenBSD.com/