Bug 5258 - multiple key presses can confuse server release table
Summary: multiple key presses can confuse server release table
Status: NEW
Alias: None
Product: ThinLinc
Classification: Unclassified
Component: VNC (show other bugs)
Version: trunk
Hardware: PC Unknown
: P2 Normal
Target Milestone: MediumPrio
Assignee: Pierre Ossman
URL:
Keywords:
Depends on:
Blocks: 3523
  Show dependency treegraph
 
Reported: 2014-09-17 10:40 CEST by Pierre Ossman
Modified: 2018-11-07 09:43 CET (History)
0 users

See Also:
Acceptance Criteria:


Attachments

Description Pierre Ossman cendio 2014-09-17 10:40:21 CEST
Spawned off bug 4971:

A very interesting corner case. This series of events can get the server confused:

 1. AltL press
 2. ShiftL press
 3. AltL press

What is also needed is Alt_L like this in the keymap:

> keycode  64 = Alt_L Meta_L Alt_L Meta_L
> keycode 204 = NoSymbol Alt_L NoSymbol Alt_L

(this is the default with the us keymap)

What will happen is that 1. will be sent as key 64, 2. as 50, and then 3. as key 204. At that point releasing Alt_L will only release key 204 and key 64 will remain wedged.


We need to check that a key isn't already in the pressed keys array and avoid the double allocation.
Comment 1 Pierre Ossman cendio 2018-11-07 09:43:08 CET
Shift-Alt is a bit special since it often sends Meta, so it got a special workaround upstream:

https://github.com/TigerVNC/tigervnc/commit/3b532f87b26d791b0b64b87aa39141d1a81098e8

That might hide this bug for this specific scenario. The bug should be present for other keys with the same kind of mapping though.

Note You need to log in before you can comment on or make changes to this bug.