On ב', 2005-10-03 at 21:30 +0300, Ilya Konstantinov wrote:
> 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"

So far, I was unable to figure out how X discerns this keycode from the
Linux console keycode.

For example, Left Windows key's scancode (set 1) is 0xE0 0x5B, Linux
console keycode is 125 and X KeyPress keycode is 115.
For most keys, the console keycode and the X keycode have a delta of 8.
For Left Windows key's though, they have a delta of 10.

The relevant source code proved too confusing, and anyway, it's not
trivial to snag the actual AT scancode on Linux from within X. (VMWare
probably does it by running as suid-root.)

> 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).

It seems that, while Linux' keycodes are standartized, making rdesktop
rely on them would hurt its' portability, and we cannot get the
scancodes directly.

Therefore, the only solution would be what I've mentioned above. This
solution would still be problematic since ISO_Next_Group /
ISO_Prev_Group would be fired for the group-switching sequence, and
we're really not interested in sending it as-is to the RDP session (as
Windows doesn't have an analogue of this "key"). Instead, we should
somehow find the original key.

I guess it's time to move this to rdesktop-devel...


================================================================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