On א', 2005-10-02 at 23:56 +0300, Amit Aronovitch wrote:
>   This thing was driving me crazy lately, so I was anxious to try out
> your tip.
> When I run rdesktop with '-k none' the 'sticky' nightmare seems to be
> gone, BUT - now some important keys (the normal arrows,
> insert/end/home/del) are completely ignored ...
>  
>  Any idea what's going on?

Yeah, I've noticed this too (shortly after writing this tip :)

I'm planning to look at what rdesktop does with scancodes and keycodes.
Technically, all it can know about the scancode of the pressed key comes
from the X keyboard events which you can see by running 'xev', e.g.:

KeyPress event, serial 27, synthetic NO, window 0x3800001,
    root 0x58, subw 0x0, time 185736469, (255,481), root:(263,573),
    state 0x0, keycode 24 (keysym 0x71, q), same_screen YES,
    XLookupString gives 1 bytes:  "q"

KeyPress event, serial 27, synthetic NO, window 0x3800001,
    root 0x58, subw 0x0, time 185739172, (255,481), root:(263,573),
    state 0x0, keycode 100 (keysym 0xff51, Left), same_screen YES,
    XLookupString gives 0 bytes:  ""

Apparently, 'q' is received from the keyboard as keycode 24 and 'Left
arrow' is keycode 100. Those are the hardware codes which enter the XKB
layer, get translated into symbolic keycodes by the "XKB keycodes" maps
and then into keysyms (X11 analogue of Windows virtual keys) by the "XKB
symbols" maps.

RDP's key packet contains both the scancode and the keycode. Guess we
should check the meaning of "scancode" as far as RDP is concerned
(probably the same as WM_KEYDOWN's "scancode" value) and compare it with
what XFree86 gives us.

If this doesn't work out, I'll take the aproach I've meant to take
originally: adding an option to resolve all keycodes to keysyms with
group #0 of XKB (thus disregarding the X language switch).
-- 
Ilya Konstantinov <[EMAIL PROTECTED]>

================================================================To unsubscribe, 
send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]

Reply via email to