Subject: strange keyboard behavior with X 4.3.0
To: None <port-alpha@netbsd.org>
From: Manuel Bouyer <bouyer@antioche.lip6.fr>
List: port-alpha
Date: 03/12/2003 19:55:03
Hi,
so I installed XFree 4.3.0 on my AS255 (running 1.6.1_RC2), with a S3 virge
graphic.
I have strange behavior of the keyboard: for the arrow keys, events are
doubled. That is, in a xterm if I press KP_Left the cursor moves left 2 times
(this is confirmed by xevent). Also, when using a keypad combination with
the arrow key (say, shift-left arrow), the X server sees an extra KeyRelease
event before the leftarrow events, and an extra KeyPress event after
for the shift.
Here is a Xev snapshot of a shift-leftarrow:

KeyPress event, serial 22, synthetic NO, window 0x2a00001,
    root 0x3b, subw 0x0, time 3817421111, (-166,171), root:(237,364),
    state 0x0, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,
    XLookupString gives 0 bytes:  ""

KeyRelease event, serial 22, synthetic NO, window 0x2a00001,
    root 0x3b, subw 0x0, time 3817422108, (-166,171), root:(237,364),
    state 0x1, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,
    XLookupString gives 0 bytes:  ""

KeyPress event, serial 22, synthetic NO, window 0x2a00001,
    root 0x3b, subw 0x0, time 3817422122, (-166,171), root:(237,364),
    state 0x0, keycode 83 (keysym 0xff96, KP_Left), same_screen YES,
    XLookupString gives 0 bytes:  ""

KeyRelease event, serial 22, synthetic NO, window 0x2a00001,
    root 0x3b, subw 0x0, time 3817422122, (-166,171), root:(237,364),
    state 0x0, keycode 83 (keysym 0xff96, KP_Left), same_screen YES,
    XLookupString gives 0 bytes:  ""

KeyPress event, serial 22, synthetic NO, window 0x2a00001,
    root 0x3b, subw 0x0, time 3817422168, (-166,171), root:(237,364),
    state 0x0, keycode 83 (keysym 0xff96, KP_Left), same_screen YES,
    XLookupString gives 0 bytes:  ""

KeyRelease event, serial 22, synthetic NO, window 0x2a00001,
    root 0x3b, subw 0x0, time 3817422168, (-166,171), root:(237,364),
    state 0x0, keycode 83 (keysym 0xff96, KP_Left), same_screen YES,
    XLookupString gives 0 bytes:  ""

KeyPress event, serial 22, synthetic NO, window 0x2a00001,
    root 0x3b, subw 0x0, time 3817422169, (-166,171), root:(237,364),
    state 0x0, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,
    XLookupString gives 0 bytes:  ""

KeyRelease event, serial 22, synthetic NO, window 0x2a00001,
    root 0x3b, subw 0x0, time 3817422169, (-166,171), root:(237,364),
    state 0x1, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,
    XLookupString gives 0 bytes:  ""

KeyPress event, serial 22, synthetic NO, window 0x2a00001,
    root 0x3b, subw 0x0, time 3817422893, (-166,171), root:(237,364),
    state 0x0, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,
    XLookupString gives 0 bytes:  ""

KeyRelease event, serial 22, synthetic NO, window 0x2a00001,
    root 0x3b, subw 0x0, time 3817422893, (-166,171), root:(237,364),
    state 0x1, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,
    XLookupString gives 0 bytes:  ""



Does anyone have the same problem with XF4 on VGA adapters ?
I had to add
    Option "Protocol" "wskbd"
    Option "Device" "/dev/wskbd0"
in the XF86Config, otherwise the X server wouldn't start, saying it can't
find the keyboard. I am using the wrong protocol, or is it a bug in
the wskbd driver ?

Also, minor annoyance, the X server can't restore text mode properly ...

--
Manuel Bouyer, LIP6, Universite Paris VI.           Manuel.Bouyer@lip6.fr
     NetBSD: 24 ans d'experience feront toujours la difference
--