Synergy

Issue Tracker (powered by SPIT)

Bug #242 - Right Shift Key not getting sent to client when client is running Remote Desktop to another computer

Status:
Accepted
Priority:
Normal
Assignee:
None
Category:
None
Target:
None
Found:
None
Created by:
Created on:
2 Oct 2009
Updated by:
Updated on:
25 Jul 2012 01:11
Platform:
None
Google ID:
gc-233
Redmine ID:
272

  • Duplicated by: Bug #358 - Shift on client desktop fails in RDP

Google user: jeffmic34

Tips:
- Have you searched for an existing or similar issue?
Yes - did not see this exact issue
- If you have a question, please post on the mailing list.
- Have you selected the correct issue template?
Yes

What list of steps will reproduce the problem?
Open a Remote Desktop session from XP to Windows 2000. Attempt to use
Right shift key. Does not work.

What version of operating system, and Synergy+ are you using?

Windows XP 64bit as server, windows XP x86 as client. Using
Synergy+1.3.4x64 on the XP 64bit server, and Synergy+1.3.4x86 on XP x86
client.

What is the expected behaviour, and what happens instead?
Expect right shift key to function like left shift key when using Remote
Desktop. Left shift key works fine, right shift key does not work.

Is there a way of temporarily working around your problem?
Use the left shift-key when using Remote Desktop. Unfortunately this
means retraining 30 years of typing behavior.



#1

2 Oct 2009: Issue Importer wrote a comment.

Google user: jeffmic34

There's another work around. I just installed KeyTweek v2.3.7 and remapped the
Right shift key to the Left shift key.


#2

27 Oct 2009: Issue Importer wrote a comment.

Google user: doogyh

I can confirm this exact behaviour, Vista 64bit as server and Windows XP x86 as client.
Same program versions


29 Oct 2009: Issue Importer changed Status.

New Accepted


29 Oct 2009: Issue Importer changed Target.

?


#3

29 Oct 2009: Issue Importer wrote a comment.

Google user: nick.bolton.uk


#4

5 Nov 2009: Issue Importer wrote a comment.

Google user: abatkin

I can confirm this behavior with a Linux (Fedora 11, x64,
synergy-plus-1.3.4-3.fc11.x86_64) Synergy Server and Windows XP as the Synergy Client.

RDC clients (mstsc, from the XP box) have the same (broken right shift) behavior
whether the OS is XP or Windows Server 2003.

If I VNC from the XP box to the same XP or Windows Server 2003 boxes, right shift
works, and rdesktop from the Linux box to the same boxes also works properly.


#5

29 Dec 2009: Issue Importer wrote a comment.

Google user: br...@wy7n.us

I ran into something that sounds very similar using Synergy version 1.3.1. I wonder
if it is the same issue. (I'll try synergy-plus as soon as I can. I'm posting now,
in hopes of sharing the work-around that worked for me.)

At first glance I would have described the problem exactly as reported by jeffmic34;
serving synergy from a Ubuntu 9.04 host, the right shift key doesn't work in Windows
Remote Desktop Session on a Windows XP synergy client.

However, I probed deeper. I observed that in my case, the Windows Remote Desktop
Session was receiving the Windows Scan Code 54 (0x36) instead of the desired 42
(0x2A). At this point I had already used KeyTweak to modify
"HKEYLOCALMACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout\Scancode Map"
entry on both the synergy client machine and the remote machine being accessed via
Remote Desktop. Somehow the Synergy client is bypassing Windows keyboard remapping(!).

The temporary work-around I used was to invoke the following command before invoking
the synergy server:

xmodmap -e "keycode 62 = Shift_L"

I apologize for not trying this on synergy-plus before posting. I will as soon as I
can. Hopefully this posting will help someone in the meantime.


#6

29 Dec 2009: Issue Importer wrote a comment.

Google user: br...@wy7n.us

In case it isn't obvious to all readers, the xmodmap command is issued on the ubuntu
server.


#7

25 Jan 2010: Issue Importer wrote a comment.

Google user: basiphobe

I just wanted to confirm both the existence of this bug, and that the xmodmap
work-around mentioned in comment 5 does work (thank you!).

I'm using 64-bit synergy+ server 1.3.4 under Ubuntu 9.10, and 32-bit synergy+ client
1.3.4 under Windows XP SP3. On the Windows machine, I'm connected to a 64-bit Windows
7 via RDP, which is where the right-shift problem can be experienced 100%% of the time.


#8

26 Jan 2010: Issue Importer wrote a comment.

Google user: br...@wy7n.us

I don't know if the Synergy+ team has a fix for the bug yet; but, I can report that
the xmodmap work-around mentioned in comment 5 is working fine for me using Synergy
1.3.1.

Thanks for confirming that the bug is found in Synergy-plus. I haven't taken the
time to find out. That's one less task on my list. I'm grateful.


#9

29 Jan 2010: Issue Importer wrote a comment.

Google user: abatkin

I have done a little debugging. All of my tests were done using Linux as the Synergy+
Server and Windows XP as the Client. I am performing my tests by pressing Shift+A,
since that effectively reproduces the issue in a very simple way.

Spy++ reports that all of the keyboard events are in every way identical.

I wrote a small C++ program that captures the following events:
- WMKEYDOWN
- WM
KEYUP
- WM_CHAR

For every key pressed, the program dumps the following information:
- Event name
- Character Code (wParam)
- Repeat Count (from lParam)
- Scan Code (from lParam)
- State of the following modifiers (using GetKeyState()):
* VKLSHIFT
* VK
RSHIFT
* VKLCONTROL
* VK
RCONTROL
* VKLMENU
* VK
RMENU
* VKLWIN
* VK
RWIN
* VKCAPITAL
* VK
NUMLOCK
* VK_SCROLL

Sure enough, the events themselves are identical (character codes and the flags:
repeat count, scan code) which is consistent with Spy++. But there is a big difference.

Everything is fine with "Left Shift + A". When pressing "Right Shift + A", I observe
the following: When I use the keyboard attached to the Linux box (Synergy server,
whose events must then be sent across the network to the Windows box), GetKeyState
reports that VKLSHIFT is depressed (wrong!) while the local keyboard reports that
VK
RSHIFT is depressed.


#10

1 Feb 2010: Issue Importer wrote a comment.

Google user: severn.tsui

Client: Win XP SP3 32
Server: Win 7 64

Tried using 1.3.4 and self-built SVN rev343, same issue. RShift works properly when
typing to actual client but doesn't work in remote desktop.

I used this tool called Keyview: "http://www.cgl.ucsf.edu/home/tef/wintools/keyview.exe":http://www.cgl.ucsf.edu/home/tef/wintools/keyview.exe

On an actual client, attempting to type the letter "M" the events go:
WMKEYDOWN RSHIFT (54)
WMKEYDOWN M (50)
WM
CHAR 0x004D M
WMKEYUP M
WM
KEYUP R_SHIFT

In the remote desktop on the client:
WMKEYDOWN RSHIFT (54)
WMKEYUP RSHIFT
WMKEYDOWN M (50)
WM
CHAR 0x006D m
WMKEYUP M
WM
KEYUP R_SHIFT


#11

2 Feb 2010: Issue Importer wrote a comment.

Google user: nick.bolton.uk


#12

5 Mar 2010: Issue Importer wrote a comment.

Google user: abatkin

To follow-up from my Comment #9: The problem can be more easily reproduced by using
only the left-shift and right-shift keys:

Both locally and remotely, left shift produces WMKEYDOWN/UP events of the left shift
key (correct) and right shift produces WM
KEYDOWN/UP events of the right shift key
(also correct). So all of the key press events are totally fine. So any tests using
Spy++ or keyview or whatever will report the correct events being generated.

It's just the results of GetKeyState that are problematic.

The problem is that when you use the right shift key, if you call GetKeyState, it is
reported that VKLSHIFT is depressed (but it should obviously report that VKRSHIFT
is depressed).


#13

9 Mar 2010: Issue Importer wrote a comment.

Google user: jonesie

There was a patch created for the original Synergy2 for this.

"http://sourceforge.net/tracker/?func=detail&aid=1655591&groupid=59275&atid=490469":http://sourceforge.net/tracker/?func=detail&aid=1655591&groupid=59275&atid=490469


#14

9 Mar 2010: Issue Importer wrote a comment.

Google user: br...@wy7n.us

I'm pretty sure I tried this patch; it didn't fix the problem. I'll double check as
soon as I can.


16 Mar 2010: Issue Importer uploaded a file.

fix-rshift.patch - 27 Aug 2010 23:37


#15

16 Mar 2010: Issue Importer wrote a comment.

Google user: abatkin

I have attached a patch that should resolve this issue properly. I have tested it and
all seems well.

This patch removes some special handling that affected the right shift key behavior,
and now it all Just Works.


#16

17 Mar 2010: Issue Importer wrote a comment.

Google user: syed.a...@gilani.eu

What purpose had the special handling? Does removing it create other problems?


#17

17 Mar 2010: Issue Importer wrote a comment.

Google user: br...@wy7n.us

Thanks for the patch! I'll give it a try as soon I can then report back.


#18

18 Mar 2010: Issue Importer wrote a comment.

Google user: br...@wy7n.us

The patch seems to fix the problem.

I downloaded the latest source, compiled it and tried it.

I verified the Left Shift key wasn't being noticed on the remote desktop session of
the client.

I then applied the patch and repeated the test. With the patch both shift keys work
fine.

I have no idea what the special handling code was for.


#19

9 Apr 2010: Issue Importer wrote a comment.

Google user: tommy.yoo

Does anyone know if this patch has been compiled in a release yet?


27 Apr 2010: Issue Importer changed Status.

Accepted ?


#20

27 Apr 2010: Issue Importer wrote a comment.

Google user: syed.a...@gilani.eu

Patch applied.


#21

26 May 2010: Issue Importer wrote a comment.

Google user: ralph.frederick

It looks like this patch was applied to the release-1.3.5 branch but not the release-
1.4.0 branch. Shouldn't it be in both?


5 Jun 2010: Issue Importer changed Target.

? ?


#22

5 Jun 2010: Issue Importer wrote a comment.

Google user: nick.bolton.uk


8 Jun 2010: Issue Importer changed Status.

? Accepted


8 Jun 2010: Issue Importer changed Target.

? 1.4.1


#23

8 Jun 2010: Issue Importer wrote a comment.

Google user: nick.bolton.uk

ralph.frederick, yes, I will correct this.


#24

8 Jun 2010: Issue Importer wrote a comment.

Google user: nick.bolton.uk


#25

8 Jun 2010: Issue Importer wrote a comment.

Google user: nick.bolton.uk

TODO: Merge into 1.4.1 and trunk.


12 Jun 2010: Issue Importer changed Status.

Accepted InProgress


12 Jun 2010: Issue Importer changed Status.

InProgress ?


#26

12 Jun 2010: Issue Importer wrote a comment.

Google user: nick.bolton.uk


#27

12 Jun 2010: Issue Importer wrote a comment.

Google user: nick.bolton.uk

Should be fixed in r596 .


#28

14 Jun 2010: Issue Importer wrote a comment.

Google user: d.kownacki

Works fine in 1.4.1


#29

19 Jun 2010: Issue Importer wrote a comment.

Google user: jeffmic34

I just installed the 1.3.5 x64 version on Windows 7 and the fix does not seem to work. When I use the right-shift key within an RDC running on a connected computer, the shift function does not work. Is there another compiled version I should try to install?


#30

20 Aug 2010: Issue Importer wrote a comment.

Google user: cedric.perthuis

it doesn't work in 1.4.1 on windows 7 x64 ( synergy compiled for x32 )


#31

26 Aug 2010: Issue Importer wrote a comment.

Google user: pablo.ruiz

reproduced on 1.4.1 Win7 x64 too.


11 Jan 2011 14:00: Nick Bolton changed Status.

? Fixed


25 Jul 2012 01:08: Nick Bolton changed Status.

Fixed Accepted


#32

25 Jul 2012 01:10: Nick Bolton wrote a comment.

Reverted patch applied in r486 on 27 Apr 2010, since this caused Bug #2799. The patch caused an invalid modifier mask to be sent with key presses when right shift modifier was used. We need to come up with a client side Windows fix instead (not server side).

The special modifier handling is important.


25 Jul 2012 01:11: Nick Bolton changed Target.

1.4.1 1.4.11