It may not be exactly the same problem but it's the close to mine and when there is a simple solution to your problem, then it would most certainly fix mine too, so I'm posting it here hoping it might help someone.
My problem was: I couldn't get the Alt Gr key working. The shift key did work, ctrl+alt(=alt gr) didn't work ether.
Since Alt Gr is essential for most non-english keyboard layouts, I found a workaround to get it working (with ubuntu on the vm):
In Synergy:
1. create a keyboard shortcut in Synergy:
Hotkey: keystroke: alt gr+<x> (where x is a key you want to press together with alt gr on your keyboard layout)
Action: keystroke <special key>+<y> (y beeing the desired key on US layout)
The special key could be left/right alt/ctrl/win or menu, capslock or scrolllock, just make sure it works in the vm.
2. In the keyboard layout preferences, add the USA layout (non-default) and under layout options > layout switching check '<special key>switches layout while pressed.'
Now when alt gr + x is pressed on the server, it's converted to <special>+y, send to the host which types a x by switching to US layout, which is the same character as alt gr + x on your layout.
You may have to assign Action: <shift+special key>+<y> to type a character that is typed by using shift on the us layout.
Is there any simpler solution?
edit:
if <shift+special key>+<y> doesnt, work. you may have create more than one action per hotkey:
like
press shift,
press and releas special+x
release shift
or switch shift with special or change special behavior in ubuntu to switch rather than while pressed.