I asked this on Github issues a while ago but nobody responded, so I'm trying again here.
When I'm working on my Linux client, I have music or video running on my Windows server. When I press media keys (like mute) when the Linux client is in focus, the mute key is forwarded to the Linux client properly, as it should. But: I would like all media keys (audio up, audio down, mute, play/pause etc.) to always register only on the server, no matter what screen is in focus. This way I can work on my Linux screen while listening on music on my Windows server, and I can click the pause media key to pause the music.
Poking around the wiki on Github I made this config:
section: screens
beast:
shiny:
end
section: links
beast:
left = shiny
shiny:
right = beast
end
section: options
switchCorners = all
switchCornerSize = 100
switchDelay = 0
keystroke(AudioMute) = keystroke(AudioMute,beast)
keystroke(AudioDown) = keystroke(AudioDown,beast)
keystroke(AudioUp) = keystroke(AudioUp,beast)
keystroke(AudioPlay) = keystroke(AudioPlay,beast)
keystroke(AudioPrev) = keystroke(AudioPrev,beast)
keystroke(AudioNext) = keystroke(AudioNext,beast)
end
"beast" is the name of my Windows PC, "shiny" is the name of my Linux laptop. As you can see in the options section, I'm trying to get the media keys to register only on "beast", but what happens instead is that the media keys stop working completely.
As soon as I add the line keystroke(AudioMute) … to the config and apply it, the mute button stops working completely both on the client and on the host. As soon as I stop Synergy, the button works again on the server (of course). This goes for all the audio buttons.
I am sure that "beast" is the right screen name, because the log has lines like:
switch from "beast" to "shiny" at 3439,464
The log says nothing when I try to press the mapped keyboard buttons.
I also tried to map the buttons to themselves, without specifying the screen:
keystroke(AudioMute) = keystroke(AudioMute)
keystroke(AudioDown) = keystroke(AudioDown)
keystroke(AudioUp) = keystroke(AudioUp)
keystroke(AudioPlay) = keystroke(AudioPlay)
keystroke(AudioPrev) = keystroke(AudioPrev)
keystroke(AudioNext) = keystroke(AudioNext)
Now the media keys work on the Linux client, but not on the Windows host. Is this perhaps a bug where the media keys can't be simulated on Windows hosts?
Is this a bug, or have I done something wrong? How do I accomplish what I'm trying to do?
(I'm using Synergy version 1.8.5-stable-a18eba7)
(Update 2017-02-15: Also tested with version 1.8.7-stable-9799e96)
Best Answer
As long as both devices are configured with the same keyboard layout (E.G. English US) the media keys should be passed through without any specific config changes.
My Synergy between two devices (Windows 10 to Windows 10) is passing the media keys through without any specific config changes. My config file is attached.