[Thinlinc-technical] multiple modifiers
David Edmondson
dme at dme.org
Thu Jan 24 14:12:16 CET 2013
On Thu, Jan 24 2013, Peter Åstrand wrote:
> Btw, which keyboard layout do you have?
US (I'm in the UK, but have been using US keyboards for 20+ years and
it's too late to change now).
That said, I notice that Xvnc is running with what appears to be a
Swedish keyboard map?
/opt/thinlinc/libexec/Xvnc :1 -depth 24 -geometry 1920x1200 -fp
catalogue:/etc/X11/fontpath.d,/usr/share/fonts/X11/misc,/usr/share/fonts/X11/Type1,/usr/share/fonts/truetype
-auth /var/opt/thinlinc/sessions/dme/1/Xauthority -desktop
dme at gag-halfrunt -rfbport 5901 -rfbauth
/var/opt/thinlinc/sessions/dme/1/sessionkey -br -nolisten tcp -localhost
-KeyboardMap=sv
I didn't consciously do anything to cause this (though I have to confess
that at one point I did modify the session starter code to pass +kb, but
took that out again).
>>Most commonly I notice the problem when I want to type M-<
>>(alt-shift-,) or M-> (alt-shift-.). The 'alt' part is lost, and I end
>>up inserting < or > into the relevant buffer.
>>
>>I'm not able to reliably cause this to happen, though it feels as though
>>it is more likely when I hit shift slightly before alt. If I get into
>>the broken state (i.e. < or > is being inserted), then keep shift and
>>alt held down, nothing changes. Letting go and pressing again can
>>usually result in a working system (but my concentration is destroyed).
>
> When I'm testing, the "end-of-buffer" command is executed correctly
> when I press Alt, Shift, "<", but if I press Shift, Alt, "<", then a
> ">" is inserted. This is repeatable.
Yes, this matches with my previous feeling and some quick testing. I'll
try to train my hands, but it will be hard :-)
>>In a similar vein, I believe that I occasionally see stuck modifiers,
>>either control or alt.
>>
>>These problems occur with both the Debian and Windows clients.
>>
>>Is there any other experience of this phenomenon? It's ruining an
>>otherwise wonderful experience.
>
> I haven't seen stuck modifiers in a long time, but when testing this
> particular case, I also got a stuck Alt key. That's
> ... interesting. Looks like a bug in our Xserver. I'll continue
> investigating.
Thanks!
>>The Mod1 modifier (the Alt key) is definitely sticking
>>regularly. Pressing Alt again clears it. Control is occasionally
>>sticky. Pressing Control again clears it. If no chording of the
>>modifiers occurs, the stickiness doesn't appear.
>
> Thanks for the investigation. I cannot get Ctrl to stick, though.
It may be that I mistook a stuck Alt for Control.
>>Most odd is the behaviour when I press Mod4-; (that's the Windows key
>>and semi-colon). In xev I see:
>>
>> [...]
>>
>>There's a spurious KeyPress (and KeyRelease) for the left shift key,
>>which I'm definitely not pressing, and the KeyRelease event mentions
>>comma (,) rather than semi-colon!
Whilst I mostly understand your explanation, there are a couple of
things that don't seem right:
> Yes, this looks a little bit strange, but this is actually how it
> "should" be. Here's the details: We are using the VNC protocol, which
> transfers symbolic "keysyms" rather than physical "keycodes". However,
> modifier keys also have keysyms. When you press, the windows key,
> Super_L is immediately transferred. Same goes for Shift_L.
I didn't press Shift, and semi-colon is not a shifted character on my
keyboard. (Comment below on why this is a problem.)
> Then, an actual symbol is produced at the client side: ";", so it is
> transferred as well. The keyboard state in the remote session has both
> Super_L and Shift_L activated. Fortunately, the keyboard layout table
> has a way producing ";" in this state. (If not, additional modifiers
> will be "faked".) Then, the server will generate keycode 59, and the
> actual ";" will be produced. During release, "," will be produced
> since Shift_L has already been lifted.
Comma and semi-colon are not on the same key, which I would expect to be
a requirement for this explanation to make sense.
> This is ok; this is what will happen on a local workstation as well,
> if you lift Shift before the symbol key. Applications should not care.
This causes trouble because I have different keybindings for
Mod4-semicolon and Mod4-Shift-semicolon. The result of the spurious
'shift' being set in the modifier bits (it's an XCB application reading
the key presses) is that the wrong binding is executed.
I can't figure out how to pass just Mod4-semicolon to the server at all.
Ah - I just looked at the Swedish layout on Wikipedia and semi-colon is
shifted comma! That would fit with the -KeyboardMap=sv argument and your
explanation.
How do I change the keyboard map passed to Xvnc?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.cendio.se/pipermail/thinlinc-technical/attachments/20130124/de804aa5/attachment-0005.sig>
More information about the Thinlinc-technical
mailing list