Bug #242 - Right Shift Key not getting sent to client when client is running Remote Desktop to another computer
- 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?
YesWhat 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
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
Google user: doogyh
I can confirm this exact behaviour, Vista 64bit as server and Windows XP x86 as client.
Same program versions
#4
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
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
Google user: br...@wy7n.us
In case it isn't obvious to all readers, the xmodmap command is issued on the ubuntu
server.
#7
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
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
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
- WMKEYUP
- 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
* VKRSHIFT
* VKLCONTROL
* VKRCONTROL
* VKLMENU
* VKRMENU
* VKLWIN
* VKRWIN
* VKCAPITAL
* VKNUMLOCK
* 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
VKRSHIFT is depressed.
#10
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)
WMCHAR 0x004D M
WMKEYUP M
WMKEYUP R_SHIFT
In the remote desktop on the client:
WMKEYDOWN RSHIFT (54)
WMKEYUP RSHIFT
WMKEYDOWN M (50)
WMCHAR 0x006D m
WMKEYUP M
WMKEYUP R_SHIFT
#12
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 WMKEYDOWN/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
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
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.
#15
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
Google user: syed.a...@gilani.eu
What purpose had the special handling? Does removing it create other problems?
#17
Google user: br...@wy7n.us
Thanks for the patch! I'll give it a try as soon I can then report back.
#18
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
Google user: tommy.yoo
Does anyone know if this patch has been compiled in a release yet?
#21
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?
#23
Google user: nick.bolton.uk
ralph.frederick, yes, I will correct this.
#25
Google user: nick.bolton.uk
TODO: Merge into 1.4.1 and trunk.
#27
Google user: nick.bolton.uk
Should be fixed in r596 .
#29
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
Google user: cedric.perthuis
it doesn't work in 1.4.1 on windows 7 x64 ( synergy compiled for x32 )
#31
Google user: pablo.ruiz
reproduced on 1.4.1 Win7 x64 too.
#32
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.
Write comment