[PATCH 1/2] Add more keyboards for the RDP compositor

Bill Spitzak spitzak at gmail.com
Fri Apr 11 13:49:51 PDT 2014


On 04/11/2014 01:10 PM, Hardening wrote:
>
> I have heard that in some cases windows layouts (which are also RDP 
> ones) don't match exact the XKB ones :(. So the surprises can come 
> when using mstsc against a linux host.
>
> Regards.
>
I have had it fail between different versions of Linux with very similar 
keyboards. At work they used SUSE and at home I had Ubuntu 12.04. When I 
NX from home, every single function key was messed up. Up arrow was 
PrintScreen, for instance.

Somebody at work had fortunately done all the hard work, which basically 
involved using xev to see what keycode it coughed up when you hit keys 
and making an xmodmap entry for every one of these. This table worked 
for me.

Then they updated to Centos at work, and it *still* failed, but with an 
all-new and different set of keysyms. I only managed to fix the arrows 
and just lived with it, but this is plainly a totally unacceptable 
situation for user friendliness!

I also used the OS/X NX at home to the same machine. It had a different 
(smaller) set of screwed up function keys. And different, so I could not 
automatically run xmodmap on detecting NX. You would think it would be 
worse when you are not running X but in fact it was somewhat better. In 
particular the arrows did work.

Note that the *keysym* after it worked was absolutely identical on both 
ends. The only difference in the keyboards is my home one lacked a 
"windows" key, which should have had ONLY the effect that I could not 
type the Windows key!

In Wayland I have also seen bugs where the input method disagrees with 
the client about what a key decodes to, and this is with the *same* 
keyboard on the *same* machine! I think it would be a good idea to make 
this impossible.

I recommend that key events be enhanced to have 2 keysyms in addition to 
the hardware scan codes. One is the "which physical button on the 
keyboard" and the other is "effective keysym including shift state". It 
is allowed to put a special "I don't know" value in any of these, and 
clients are expected to figure out what they can from the "known" parts. 
A client may run xkb decoding if it wants, but the compositor can also 
do it in one place, so at least everything will match.

You also need to look into allowing the input method to run on the local 
machine, thus the communication of text from the input method must be sent.



More information about the wayland-devel mailing list