[Xquartz-dev] My RADAR report 6165507
George Peter Staplin
georgeps at xmission.com
Sun Dec 14 01:25:57 PST 2008
Quoted Peter Collinson <pc at hillside.co.uk>:
> Just to refresh memories my bug report is:
>
> 21-Aug-2008 12:48 AM Peter Collinson:
> Summary:
> If I screen share from my laptop to my main machine - I cannot get any
> control characters through to X apps on the main machine. It looks as
> if screen sharing is sending incorrect[NSEvent modifiers] with the
> keypress... (diagnosis courtesy of Jeremy Huddlestone). The X server on
> the target machine version X11 2.3.1 release candidate 1.
>
> Steps to Reproduce:
>
> 1) Install the new release of X11 on the target machine
> 2) Open an xterm window
> 3) Screen share from another machine into the target machine
> 4) Select the xterm window - and press Control-C
> 5) Observe the character 'c' appearing in the window
> 6) Now start xev on the target machine and press 'Control' and 'c'
>
> there is some more in the report whcih diagnoses the problem.
>
> Well.................... I've just had a response:
I have some ideas of what may be the cause, though I'm not certain. I
implemented a VNC widget earlier this year based on what I learned
from this protocol document:
http://www.realvnc.com/docs/rfbproto.pdf
In particular I wonder if the key handling is correct here:
http://cgit.freedesktop.org/xorg/xserver/tree/hw/xquartz/X11Application.m?h=xorg-server-1.4-apple
If say the user does:
"Shift a" the resulting key may be a symbol A to XQuartz, but really
we want it to be: Shift, and a, and to let X11 produce an A if needed.
The user should also be able to remap "shift a" to be entirely
different than A too (via tools like xmodmap). Some of the X i18n
support also relies on the ability to coalesce multiple events into a
single event for a composed character (see XFilterEvent and friends).
Jeremy, is that how it works now?
From page 23 of rfbproto.pdf:
"The ?shift state? (i.e. whether either of the Shift keysyms are down)
should only be used as a hint when interpreting a keysym. For example,
on a US keyboard
the ?#? character is shifted, but on a UK keyboard it is not. A server
with a US
keyboard receiving a ?#? character from a client with a UK keyboard will not
have been sent any shift presses. In this case, it is likely that the
server will internally need to ?fake? a shift press on its local
system, in order to get a ?#? character and not, for example, a ?3?."
Peter, what happens with the shift key in the same xterm over VNC?
This could also be a bug in the VNC implementation.
Another idea (from page 24): "On a viewer where modifiers like Control
and Alt can also be used to generate character-based keysyms, the
viewer may need to send extra ?release? events in order that the
keysym is interpreted correctly."
George
--
http://people.freedesktop.org/~gstaplin/
More information about the Xquartz-dev
mailing list