lack of GetModifierMapping/SetModifierMapping symmetry

Pierre Ossman ossman at cendio.se
Tue Apr 28 07:07:37 PDT 2009


I'm having a bit of a problem with Xvnc here and I need to understand
the core design a bit more.

The basic problem is that some client does GetModifierMapping followed
by a SetModifierMapping. This has the effect of completely nuking the
modifier mapping tables.

The reason this happens is how Xorg handles the mapping between the
multiple keyboards internally and the single keyboard exposed via X11.
A call to GetModifierMapping gives you the mappings for the currently
active keyboard, but SetModifierMapping modifies the mappings for all
keyboards (strictly speaking, all core keyboards).

Now since Xvnc shares most of its code with libvnc.so (the addon to a
running Xorg server), it adds a second keyboard and does not try to
make it the primary one. Since Xorg wants a primary keyboard, it
creates a dummy one which is basically blank. So the client mentioned
above will read the empty mappings from this dummy keyboard and write
them to the VNC keyboard.

I'm not entirely sure how to fix this. I'd like to understand why
GetModifierMapping/SetModifierMapping are implemented the way they are
first though. Does anyone have any insight into that?

Peter, you've been neck deep in Xorg's input layer for some time now.
Do you have any ideas?

Rgds
-- 
Pierre Ossman            OpenSource-based Thin Client Technology
System Developer         Telephone: +46-13-21 46 00
Cendio AB                Web: http://www.cendio.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
Url : http://lists.x.org/archives/xorg-devel/attachments/20090428/8e8c23d1/attachment-0001.pgp 


More information about the xorg-devel mailing list